Translate

2014年10月20日 星期一

轉帖Xcode6中怎么添加空工程模板


把Empty Application.xctemplate 拷贝到
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS/Application下就可以了
但是要保证你的Xcode的路径是正确地。退出Xcode 再打开就可以了
Empty Application.xctemplate

2014年7月20日 星期日

轉帖:iOS7下UINavigationController Push / Pop ViewController 动画过程中出现视图叠加重影问题的解决

轉帖link
前两天,遇到一个莫名其妙的问题。
使用UINavigationController push一个新的controller的时候, 动画过程中rootController的view上的元素总是会有一部分叠加在新的controller的view上, 造成视觉混乱。

后来发现,由于创建controller 时,view默认的background color为透明色。(主要是当所有的view背景均显示为白色的时候,很难去发现这个背景色是透明的) 只要讲这个背景色改成非透明色即可!

在这里留个记号!

2014年6月26日 星期四

Facebook Creat App Status for iOS

今天需要測試一下Feacbook的iOS SDK的Login功能
沒想到facebook又大改版所以一些步驟也都忘光光了
一開始都照著facebook文件一步一步去做
後來遇到怎樣都不行讓facebook的App激活起來
如圖
後來問一下朋友原來是在Status & Review這部分
Do you want to make this app and all its live features available to the general public
選項要為YES
如圖
修改為這樣

這樣App就正式搞定了

2014年6月10日 星期二

UIDocumentInteractionController 快速分享到其他應用程式

sample code #import @interface ViewController : UIViewController { IBOutlet UIImageView *img; BOOL preview; UIDocumentInteractionController *documentInteractionController; } @end - (IBAction)shareDocument:(id)sender { NSURL *URL = [[NSBundle mainBundle] URLForResource:@"test" withExtension:@"png"]; if (URL) { // Initialize Document Interaction Controller documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:URL]; if (preview) { [documentInteractionController setDelegate:self]; [documentInteractionController presentPreviewAnimated:YES]; } else { [documentInteractionController presentOpenInMenuFromRect:[sender frame] inView:self.view animated:YES]; } } } #pragma mark - #pragma mark - UIDocumentInteractionControllerDelegate - (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller { return self; } - (UIView *)documentInteractionControllerViewForPreview:(UIDocumentInteractionController *)controller { return self.view; } - (CGRect)documentInteractionControllerRectForPreview:(UIDocumentInteractionController *)controller { return self.view.frame; }