摘要:
NSDate *currentDate = [NSDate date];NSCalendar* calendar = [NSCalendar currentCalendar];NSDateComponents* components = [calendar components:NSYearCalendarUnit|NSMonthCalendarUnit|NSDayCalendarUnit fromDate:currentDate]; // Get necessary date components[components month] //gives you month[components 阅读全文
摘要:
1.将 xib 文件名手动更改为 xxx~iphone.xib 和 xxx~ipad.xib2.初始化时使用 [[xxx alloc] init] 即可,系统会自动判断系统类型并加载对应的 xib 文件RFSendFeedbackViewController *viewController = [[RFSendFeedbackViewController alloc] init];RFNavigationController *navController = [[RFNavigationController alloc] initWithRootViewController:viewContr 阅读全文
摘要:
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/LoadingResources/Introduction/Introduction.html#//apple_ref/doc/uid/10000051i-CH1-SW1 阅读全文
摘要:
http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/ 阅读全文
摘要:
from:stackoverflowThe view'swindow propertyis non-nil if a view is currently visible, so check the main view in the view controller:[EDIT]Invoking theviewmethod causes the view to load (if it is not loaded) which is unnecessary and may be undesirable. It would be better to check first to see if 阅读全文
摘要:
UIGraphicsBeginImageContextWithOptions(newSize, NO, 0.0); [image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)]; UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return newImage; 阅读全文
摘要:
- (void)setTabBarHidden:(BOOL)hidden{ UIView *tab = self.tabBarController.view; if ([tab.subviews count] < 2) { return; } UIView *view; if ([[tab.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]]) { view = [tab.subviews objectAtIndex:1]; } else { ... 阅读全文
摘要:
http://blog.bubbly.net/2013/09/11/slick-tricks-for-ios-blur-effect/Full sample sources available athttps://github.com/kronik/DKLiveBlur 阅读全文
摘要:
http://stackoverflow.com/a/8874812 阅读全文
摘要:
http://stackoverflow.com/a/5379013 阅读全文