iPhone code snippets
Tuesday, April 5, 2011
Rename project in xcode
I found step by step instructions here How to Rename /Duplicate iPhone Project in Xcode 3.x"
Tuesday, November 9, 2010
Wednesday, September 8, 2010
Auto Refresh Table view at a certain frequency
time interval is 5sec
NSTimer *timer = [NSTimer timeWithTimeInterval:5.0
target:self
selector:@selector(reloadData:)
userInfo:nil
repeats:YES];
[NSRunLoop mainRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];
-(void)reloadData:(NSTimer*)tim {
[tableView reloadData];
}
NSTimer *timer = [NSTimer timeWithTimeInterval:5.0
target:self
selector:@selector(reloadData:)
userInfo:nil
repeats:YES];
[NSRunLoop mainRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];
-(void)reloadData:(NSTimer*)tim {
[tableView reloadData];
}
Wednesday, February 10, 2010
One of the screens to have Tabs .... Nah
From developer.apple.com -
That's my understanding from the Apple notes - when there are multiple screens managed by a UINavigationController , one of the screens cannot be UITabController.
Please correct me if I am wrong.
A navigation controller should not incorporate a tab bar controller as part of its navigation interface. The resulting interface would be confusing to users because the tab bar would not be consistently visible.
That's my understanding from the Apple notes - when there are multiple screens managed by a UINavigationController , one of the screens cannot be UITabController.
Please correct me if I am wrong.
Labels:
UITabController
Tuesday, February 2, 2010
Convert RGB to HEX
// Convert the RGB numbers to hex strings
NSString *redHexValue=[NSString stringWithFormat:@"%02x", redIntValue];
NSString *greenHexValue=[NSString stringWithFormat:@"%02x", greenIntValue];
NSString *blueHexValue=[NSString stringWithFormat:@"%02x", blueIntValue];
// Concatenate with a "#"
NSString * hexColor = [NSString stringWithFormat:@"#%@%@%@",
redHexValue,greenHexValue, blueHexValue];
Friday, January 8, 2010
Bundle Name , Product Name , Target Name
- Bundle Display Name under info.plist - Changes the display name under the app Icon.
- Product Name under Project build settings - Changes the name of the executable.
- Edit Target Name by changing the Name under Target->General
Subscribe to:
Posts (Atom)