
技术
柯木琴子
这个作者很懒,什么都没留下…
展开
-
iOS 数组 字典新写法
1. NSArray *array =@[@"1",@"2"]; NSLog(@"array = %@",array); NSDictionary *dic =@{[NSNumbernumberWithInt:1]:@"a1", [NSNumbernumberWithInt:2]:原创 2014-04-15 16:43:07 · 1839 阅读 · 0 评论 -
swift 的宏定义
swift中没有了#Define这种宏定义了,可以用let来声明常量来取代,判断当前系统版本let IS_IOS7 = (UIDevice.currentDevice().systemVersion as NSString).doubleValue >= 7.0 let IS_IOS8 = (UIDevice.currentDevice().systemVersion as NSStrin原创 2015-07-07 11:28:57 · 579 阅读 · 0 评论 -
swift单例
单例var c =0class Sigton { static var share :Sigton { struct Static { static let b =c++ static let sigton =Sigton() } println("b原创 2015-07-10 15:35:28 · 394 阅读 · 0 评论 -
获取xcode version和build
1.获取xcode version和buildNSDictionary *infoDic = [[NSBundlemainBundle] infoDictionary];NSString *version = [infoDicvalueForKey:@"CFBundleShortVersionString"];NSString *build = [infoDic valu原创 2015-07-10 15:40:15 · 793 阅读 · 0 评论 -
版本更新
-(void)checkUpdate{ NSDictionary *infoDic = [[NSBundlemainBundle] infoDictionary]; //CFShow((__bridge CFTypeRef)(infoDic)); NSString *currentVersion = [infoDicobjectForKey:@"CFBundl原创 2015-05-04 11:18:46 · 399 阅读 · 0 评论 -
ios 提交appstore报错 缺图片问题
一报错 : missing required icon file,the boundle does not contain an app icon for iPhone/iPod Touch of exactly '57*57' pixels, in .png format for iOS versions --需要提供57*57的图片 命名Icon.png info.plist->a原创 2015-04-13 11:04:50 · 396 阅读 · 0 评论 -
ios UILabel设置行间距
_contentLabel 为uilabel NSMutableAttributedString *attributedString = [[NSMutableAttributedStringalloc] initWithString:_contentLabel.text]; NSMutableParagraphStyle *paragraphString = [[N原创 2015-03-25 13:03:11 · 592 阅读 · 0 评论 -
xcode6添加pch文件
1.创建一个pch文件;2.在工程搜索框中输入prefix ,然后在prefix header中输入${SRCROOT}/pch/上面创建的pch文件名,最后enter即可原创 2014-12-26 10:27:24 · 452 阅读 · 0 评论 -
Xcode 快捷键
1. 常用xcode快捷方式(1). 文件CMD + N: 新文件CMD + SHIFT + N: 新项目CMD + O: 打开CMD + S: 保存CMD + SHIFT + S: 另存为CMD + W: 关闭窗口CMD + SHIFT + W: 关闭文件(2). 编辑CMD + [: 左缩进CMD + ]: 右缩进CMD +原创 2014-12-23 13:29:29 · 590 阅读 · 0 评论 -
iOS 添加粘贴板的功能(复制功能)
1. UIPasteboard *board = [UIPasteboardgeneralPasteboard]; board.string =@" 需要粘贴的问题字符串";原创 2015-08-24 17:54:12 · 1411 阅读 · 0 评论 -
iOS UIApplication功能十分强大的openURL方法
UIApplication *app = [UIApplication shareApplication];1>.打电话[app openURL:[NSURL URLWithString:@"tel://10086"]];2>.发短信 [app openURL:[NSURL URLWithString:@"sms://10086"]];3>.发邮件[app openURL:原创 2015-08-25 09:52:00 · 792 阅读 · 0 评论 -
清除mac垃圾的路径
1. /Users/用户名/Library/Developer/Xcode/DerivedData原创 2016-02-22 10:03:43 · 1065 阅读 · 0 评论 -
ios 将证书生成pem文件
进入终端,到证书目录下,运行以下命令将p12文件转换为pem证书文件:openssl pkcs12 -in MyApnsCert.p12 -out MyApnsCert.pem -nodes原创 2016-01-08 15:37:17 · 395 阅读 · 0 评论 -
查看iOS崩溃日志从 Mac OS X上
大部分用户可能都会使用iTunes软件来管理iPhone或者iPad设备,这时候同步的Crash日志就会同步到电脑上,我们只需要在特定的路径里面寻找即可。Mac OS X:~/Library/Logs/CrashReporter/MobileDeviceWindows XP:C:\Documents and Settings\Application Data\Apple c原创 2015-12-30 09:54:29 · 3274 阅读 · 0 评论 -
react native环境搭建for iOS
React Native iOS环境搭建前段时间React Native for Android发布,感觉React Native会越来越多的公司开始研究、使用。所以周六也抽空搭建了iOS的开发环境,以便以后利用空闲的时间能够学习一下。废话不多说了,下面简单的列出步骤吧。 1. 安装Homebrew Homebrew主要用于安装后面需要安装的watchman、flow原创 2015-12-29 10:14:51 · 819 阅读 · 0 评论 -
ios获取设备唯一标志的解决方案
那么在开发中如何才能标识设备的唯一性呢?apple公司提供的方法是通过keychain来存一些标志信息,然后通过存的标志信息来让应用程序来识别该设备的唯一性。 apple公司写了一个简单的操作keychain的工具类:https://developer.apple.com/library/ios/samplecode/GenericKeychain/Listings/Classes_Key原创 2015-10-13 13:56:50 · 676 阅读 · 0 评论 -
git版本控制
一.git版本控制原创 2015-11-04 11:43:04 · 368 阅读 · 0 评论 -
SVN版本控制
用到的svn命令语句主要如下:打开命令终端 1.创建svn目录: mkdir svnroot cd svnroot mkdir repository svnadmin create /Users/yourmacname/Desktop/svnroot/repository/原创 2015-11-03 14:35:01 · 382 阅读 · 0 评论 -
iOS添加非自带字体库
当iOS自带的字体满足不了自己的项目需求时,需要应用其他的字体时,需要下载其他的字体库来ttf文件,下面介绍步骤:一.下载字体库 ttf文件导入项目中; 二.在Info.plist文件里添加Add Row->Fonts provided by application,然后将上面那些ttf文件都添加进来: 三.在项目中测试看有没有添原创 2015-08-19 14:10:02 · 434 阅读 · 0 评论 -
删除Xcode中多余的证书provisioning profile
手动删除xcode5 provisioning profile path: ~/Library/MobileDevice/Provisioning Profiles原创 2014-09-17 12:37:19 · 607 阅读 · 0 评论 -
静态库.a合并 和 .a文件上传到svn
在项目中有些文件会有一些静态库文件原创 2014-08-13 09:51:33 · 687 阅读 · 0 评论 -
iOS 有用网址
核心动画编程指南【Core Animation Programming Guide】下载地址:http://www.cocoachina.com/bbs/read.php?tid=84461&fpage=3多线程编程指南【Threading Programming Guide】下载地址:http://www.cocoachina.com/bbs/read.php?t原创 2014-04-25 10:34:39 · 545 阅读 · 0 评论 -
iOS评论页面 iOS7代码更新
NSString *urlStr = nil; if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) { urlStr = [NSStringstringWithFormat:@"itms-apps://itunes.apple.com/app/id%d&mt=8",522322732]; }else原创 2014-04-24 15:48:14 · 653 阅读 · 0 评论 -
xx duplicate symbols for architecture i386的问题
问题:symbols for architecture i386" title="[转载]duplicate symbols for architecture i386" style="margin:0px; padding:0px; border:0px; list-style:none">解决方法:You've included "filexxx" in your pro原创 2014-05-09 13:25:34 · 622 阅读 · 0 评论 -
修改xcode编辑的的字体大小和修改背景颜色,显示行号
一.怎么修改xcode编辑的的字体大小1.Xcode->Preferences...2.选中Fonts & Colors3.Command+A,全选右侧的Source Editor下的item,点击Font后面的T按钮,会弹出Fonts对话框,即可将默认字体大小11,修改。二.怎么修改xcode编辑的的背景颜色上图下面有个Background点击原创 2014-04-03 16:28:05 · 2891 阅读 · 0 评论 -
iOS 单例写法
1.基于gcd的写法原创 2014-04-18 15:39:45 · 773 阅读 · 0 评论 -
CATransition type类型
CATransition *animation = [CATransitionanimation];animation.duration =1.0;animation.type =@"cube";animation.subtype =kCATransitionFromRight;原创 2014-04-17 15:21:32 · 881 阅读 · 0 评论 -
iOS 基于UIView抖动 来回移动 缩放 翻转效果
1.来回转动 抖动效果原创 2014-04-17 16:58:12 · 2901 阅读 · 0 评论 -
iOS 版本宏定义
//版本宏#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch]==NSOrderedSame)#define SYSTEM_VERSION_GREATER_THAN(原创 2014-04-14 13:10:45 · 936 阅读 · 0 评论 -
iOS 修改系统亮度
i [[UIScreenmainScreen] setBrightness:value];原创 2014-05-20 17:25:51 · 752 阅读 · 0 评论 -
JPush极光推送 and 百度云推送
这两天在研究极光推送,极光推送原创 2014-09-15 21:43:20 · 2510 阅读 · 1 评论 -
ios 在xcode 5.0以上(做iOS7的项目)怎么设置取消iOS6的Icon半月阴影效果
ios 但我们在做xiang mu原创 2014-08-07 11:33:14 · 864 阅读 · 0 评论 -
button按钮的tittle 折行且居中显示
UIButton *button = [UIButtonbuttonWithType:UIButtonTypeRoundedRect];button.frame =CGRectMake(40,100, 200, 100); button.titleLabel.numberOfLines =2; button.titleLabel.textAlig原创 2014-05-29 09:48:52 · 1523 阅读 · 0 评论 -
iOS 生成开发(真机测试)证书 发布证书 账号登录
http://my.oschina.net/joanfen/blog/133624原创 2014-07-21 10:02:55 · 469 阅读 · 0 评论 -
iOS7.1企业级证书 http服务访问无效 解决
iOS7.1企业级证书 http服务访问无效z原创 2014-07-21 09:40:59 · 818 阅读 · 0 评论 -
ios App store版本更新
1.对于在app store上面的版本更新//NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary]; NSString *currentVersion = [infoDic objectForKey:@"CFBundleVersion"]; NSLog(@"currentVersion = %@原创 2014-07-10 22:06:37 · 708 阅读 · 0 评论 -
iOS适配问题
1.对于iOS适配问题 对于现在来说,主要是针对iOS7xi原创 2014-07-17 10:30:27 · 486 阅读 · 0 评论 -
ios项目有关的系统 uuid,系统版本号,手机型号,获取当前时间……
1.获取系统当前时间原创 2014-07-16 16:26:32 · 908 阅读 · 0 评论 -
技术学习网站和论坛
技术学习网站和论坛1.code4app : http://code4app.qiniudn.com/2.cocoachina : http://www.cocoachina.com/3.简书IOS : http://www.jianshu.com/c/2ffaa203eb6a4. segmentfault : https://segmentfault.com/t/ios5.原创 2017-04-21 11:20:18 · 429 阅读 · 0 评论