ios
czjuttsw
Learning, staying up to date, and working on the latest and greatest in languages and APIs is what keeps me excited.
展开
-
ios Xcode 如何导入类库
第一步:单击你的项目文件第二步:选择你的TARGETS(在项目文件右边一栏可以找到)第三步:选择Build Phases(第4个Tab)第四步:展开Link Binary With Libraries 或者 Target Dependencies第五步:点击加号“+”按钮选择你要添加的类库。原创 2013-08-02 10:44:38 · 6213 阅读 · 0 评论 -
获取iPhone或者iPad的UDID
1.连接iPhone或者iPad到电脑。2. 打开iTunes。3. 在Summary(概要)右边点击序列号,Serial Number会变成UDID(如果不是UDID,请继续点击)。4. command+c(MAC) 或者 Ctrl+c(Windows)复制UDID。5. 粘贴到你需要的地方。 (比如到Member Center的device里。)参考原创 2015-04-21 16:23:59 · 1854 阅读 · 0 评论 -
如何将Swift中的多参函数转化成Curring函数
假设我们有一个含有多个参数的函数,用于构建一个人的基本信息:func buildInfoWithName(name: String,#age: Int,#gender: String,#address: String,#phone: String) -> String { return "My name is " + name + ",I'm a " + g原创 2015-04-30 10:31:02 · 1224 阅读 · 0 评论 -
本地化app名字
How to Localize App NamesIt is possible to localize app names directly within Xcode and you do not need to create multiple versions of the same app. The great and wonderful InfoPlist.str转载 2015-05-07 13:56:16 · 2681 阅读 · 0 评论 -
如何在Swift中使用NSError
步骤一:声明NSError变量。一定要加"?",不加或者加"!"都不行。因为使用了optional,所以要用var而不用let。var error: NSError?步骤二:使用的时候在变量前加上"&"。NSJSONSerialization.JSONObjectWithData(data!, options: .MutableContainers, error: &error)之原创 2015-07-09 17:33:14 · 4658 阅读 · 0 评论 -
Storyboard Reference
在某些情况下,你开发的应用可能包含有各种各样的复杂界面,如果你使用Storyboard来管理这些界面,通常你会将这些界面按照相应的逻辑分成许多子模块,放在不同的storyboard里,比如注册相关的放到Register.Storyboard,图片相关的放到Photos.Storyboard,而主界面放到Main.Storbyoard。这么做的好处是不仅可以缩小每个storbyoard的打开速度,而原创 2015-06-12 23:01:30 · 2649 阅读 · 0 评论 -
UIImagePickerController本地化控件文字
在使用UIImagePickerController时候,你会发现在选择照片或者拍照的时候,界面的许多控件都是英文的,比如"Cancel","Choose"等。那么如何将它们本地化呢,比如替换成“取消”和“选取“?甚至你调用系统其它库(比如ALAssetsLibrary)返回的各种字符串都是英文的。解决这个的方案是往Info.plist里添加key/value。CFBundleDevelo原创 2015-07-04 10:10:37 · 3132 阅读 · 0 评论 -
Content Hugging Priority & Content Compression Resistance Priority 区别
AUTO LAYOUT MAGIC: CONTENT SIZING PRIORITIESSeptember 15, 2015 by Hector MatosOne of my personal favorite things about good code and well-designed features is转载 2015-11-18 11:29:17 · 2492 阅读 · 0 评论 -
ios开发 上传到App Store 时出错. iTunes Store Operation Failed, An Error occurred uploading to the iTunes
ios开发 上传到App Store 时出错. iTunes Store Operation Failed, An Error occurred uploading to the iTunes store. 的解决方法,网上找了很多. 如下(当然没有解决我的问题,可以一试):今天在提交app的时候,最后一步报错, An error occurred uploading to the iTun...转载 2018-03-05 22:58:57 · 3485 阅读 · 0 评论 -
Xcode的archive菜单选项是灰色的
如果当前Xcode选择的设备是模拟器,那么"Archive"是灰色的,不能点。把当前设备设置成连接的真机设备或者默认的"iOS Device","Archive"会变成黑色。原创 2015-04-21 16:35:30 · 22510 阅读 · 0 评论 -
AppDelegate生命周期回调顺序
1. 应用初次启动:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions- (void)applicationDidBecomeActive:(UIApplication *)application2. 连续点击原创 2015-03-09 10:04:22 · 1208 阅读 · 0 评论 -
App Store Review Guidlines
Apple DeveloperTechnologiesResourcesProgramsSupportMember CenterRecommended ResultsApp Store Review GuidelinesIntroductionWe're pleased that y转载 2014-10-30 23:55:49 · 2216 阅读 · 0 评论 -
iOS 8自定义动画转场上手指南
http://www.appcoda.com/custom-segue-animations/转载 2015-01-27 10:48:56 · 802 阅读 · 0 评论 -
如何解决警告linking against dylib not safe for use in application extensions
因为app extension限制了某些API的使用, ( App Extensions不能使用的一些API ) ,因此在自定义自己的framework后,这个framework可能包含了某些在App Extensions里不能使用的API,因此为了安全起见才会给出这个警告。下面是清除警告的方法:选中自定义framework的target(这里的例子是DarwinKit)原创 2014-12-22 17:45:30 · 4125 阅读 · 0 评论 -
AppleWatch如何打开Glance
步骤一:打开Edit Scheme...步骤二:在弹出的对话框中,左边的菜单选中“Run",点击右边的Executable下拉框,选择Glance 开头的选项,然后单击Close关闭对话框.步骤三:选择WatchKit App Scheme,点击Run按钮。如果没有出现任何问题的话,Glance会是这个样子的:这是原创 2014-12-23 10:55:47 · 2308 阅读 · 0 评论 -
如何通过代码添加ChildViewController
在Storyboard中可以通过使用embed segue连接Parent ViewController和Child ViewController。(通过Object Library的Container View可实现)如果想在代码中添加Child ViewController,步骤如下:假设我们要在Parent ViewController的ContainerView里添加Chi原创 2015-01-17 23:56:14 · 2155 阅读 · 0 评论 -
UILabel如何在Interface Builder中换行
在Interface Builder中,选中要换行的UILabel,在属性面板中,选中文本框,输入第一行文字,预要换行时,按住Optional(Alt)+Enter,自动切换到第二行,(如果直接按enter键,则是确定输入的内容,不会自动换行),同时别忘了将Lines属性设置为0。原创 2015-01-21 10:15:24 · 3269 阅读 · 0 评论 -
UIScrollview 键盘遮挡问题
#pragma mark - UIKeyboard Obscure Problem- (void)handleKeyboardStuff { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNo原创 2015-01-22 18:15:14 · 1834 阅读 · 0 评论 -
MagicalRecord如何存储实体
Poo *poo = [Poo MR_findFirst];// Update the entity in the block of saveWithBlock:[MagicalRecord saveWithBlock:^(NSManagedObjectContext *localContext) { Poo *localPoo = [poo inContext:localContex原创 2015-01-23 23:07:34 · 1594 阅读 · 0 评论 -
日期格式如何获取星期几
This should display 'Tue':new SimpleDateFormat("EEE").format(new Date());This should display 'Tuesday':new SimpleDateFormat("EEEE").format(new Date());So your specific example would be:new Sim原创 2015-01-23 21:58:51 · 2964 阅读 · 0 评论 -
iOS数字等宽字体
Helvetica Neue原创 2018-04-27 15:39:37 · 8991 阅读 · 0 评论