01 2014 档案
摘要:选中一个 Xib 文件,然后依次选择菜单中的 Editor - Canvas - Show Bounds Rectangles
阅读全文
摘要:https://github.com/Sephiroth87/ODRefreshControlImportant note if your project doesn’t use ARC: you must add the-fobjc-arccompiler flag toODRefreshControl.min Target Settings > Build Phases > Compile Sources.ODRefreshControl is a “pull down to refresh” control for UIScrollView, like the one App
阅读全文
摘要:https://github.com/kronik/DKLiveBlurSources of DKLiveBlur and Demo app to show live blur effect similar to yahoo weather iOS app.
阅读全文
摘要:https://github.com/steipete/PSTCollectionViewOpen Source, 100% API compatible replacement of UICollectionView for iOS4.3
阅读全文
摘要:https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html
阅读全文
摘要: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
阅读全文
摘要:代码部分#undef NSLocalizedString#define NSLocalizedString(key, comment) \ NSLocalizedStringFromTable(key, [[RFLanguage defaultInstance] currentLanguageFile], comment)[[RFLanguage defaultInstance] currentLanguageFile] 方法可动态返回 strings 文件的名字
阅读全文
摘要:1.创建一个 xib 文件 : Main_iPhone.xib更改 File's Owner 的 Class 为 UIApplication;添加 1 个 Window 、1 个 Object 、 1 个 UIViewController;更改Object 的 Class 为 XXAppdelegate,设置 Window 为 XXAppdelegate 的属性 _window;设置 UIViewController 为 Window 的属性 rootViewController 。2.为项目设置 Main InterfaceProject - Target - General - D
阅读全文
摘要:1.打开终端,输入cd,空格,然后将需要上传的.a文件所在的文件夹(不是.a文件)拖拽到终端(此办法无需输入繁琐的路径,快捷方便) ,回车;2.之后再输入如下命令:svn add xxx.a,回车;3.之后会出现:A (bin) xxx.a
阅读全文
摘要:以下代码由 CocoaChina 版主 “cclv” 分享,可用于判断应用运行的设备是否是 iPad#define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)// 同理,UIUserInterfaceIdiomPhone 即是判断是否是 iPhone
阅读全文
摘要:https://developer.apple.com/library/ios/navigation/index.html#section=Resource%20Types&topic=Sample%20Code
阅读全文