2009年5月26日 星期二

UIToolBar

add UIToolBar:
default center: 160, 438
default size: 320, 44
ex:
UIToolBar *toolbar = [[UIToolBar alloc] initWithFrame: CGRectMake(0, 0, 320, 44)];
toolbar.barStyle = UIBarStyleDeafult;
toolbar.center = CGPointMake(160, 438);


2009年5月20日 星期三

設定app icon

icon name:
project -> edit active target -> build -> packaging -> Product Name

2009年5月16日 星期六

UITableView

problem:
table is in view A, when row in table is selected, jump to view B
then jump back to view A, the row is still selected( in blue color)

solution:
in viewWillAppear method of view A:

NSIndexPath *selection = [self.tableView indexPathForSelectedRow];

if(selection)

{

[self.tableView deselectRowAtIndexPath:selection animated:YES];

}

[self.tableView reloadData];

UITextField

set font size in IB:
menu --> font --> show fonts

2009年4月21日 星期二

setHTTPBodyStream

remember to set "Content-Length"

2009年4月8日 星期三

life cycle of iphone app

1.
main.m:
main() --> call UIApplicationMain


2.
application delegate
applicationDidFinishLaunching is called

3.
loading app's main nib file
In info.plist, key NSMainNibFile defines main nib file name
main nib file usually contains a window object, app delegate object, etc