Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li>New File(Cocoa Touch Class -> UIViewController subclass) UITableViewController subclass, With XIB for interface(check both)</li> <li>open Xib file</li> <li>change the view style(plain->group) on Attributes Inspector(apple key + 1)</li> <li>add following code in .m file</li> </ol> <pre> - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } </pre> <pre> - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 2; } </pre> <pre> - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; cell.selectionStyle = UITableViewCellSelectionStyleNone; } if(indexPath.row == 0) { cell.textLabel.text = @"Username"; UITextField *field = [[[UITextField alloc] initWithFrame: CGRectMake(120, 10, 180, 30)] autorelease]; [cell addSubview:field]; } else if(indexPath.row == 1) { cell.textLabel.text = @"Password"; UITextField *field = [[[UITextField alloc] initWithFrame: CGRectMake(120, 10, 180, 30)] autorelease]; field.secureTextEntry = YES; [cell addSubview:field]; } return cell; } </pre> <pre> - (NSString *)tableView: (UITableView *)tableView titleForHeaderInSection: (NSInteger)section { return @"Account"; } </pre> <pre> - (NSString *)tableView: (UITableView *)tableView titleForFooterInSection: (NSInteger)section { return @"If you don't have a twitter account, go to twitter.com to sign up."; } </pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload