1、NSString转int
3,要看模拟器的document目录,要将其显隐
On Lion the users/[username]/library is hidden.
Use
chflags nohidden /users/[username]/library
in a terminal to display the folder.
4,iPhone的状态栏可以设置成半透明, 这是众所周知的, 用UINavigationController,在页面切换时, 如果你的子viewController的view是全屏的(480*320) 就会出现错位, 表现是所以的子view会向下偏移了 20像素
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];
self.navigationController.navigationBar.translucent = YES;
[self.navigationController.view setNeedsLayout];
self.wantsFullScreenLayout = YES;
[[ASIHTTPRequestsharedQueue]cancelAllOperations];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];
10.字符串是否含有某字符串
#define isRetina ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].s
ize) : NO)
15.withObject:传入整型参数
[self performSelector:@selector(frontButtonScaleUp) withObject:[NSNumber numberWithInt:[sender tag]] afterDelay:delay - elapsed];
[self performSelector:@selector(frontButtonScaleUp) withObject:(id)[sender tag] afterDelay:delay - elapsed];16.清除UIwebview产的的缓存
[[NSURLCachesharedURLCache] removeAllCachedResponses];