iOS
annssdy
这个作者很懒,什么都没留下…
展开
-
GCD (Grand Central Dispatch)
.原创 2015-01-09 17:39:15 · 458 阅读 · 0 评论 -
First Class Type
Swift中关于函数有这样的介绍Functions are a first-class type. This means that a function can return another function as its value.函数是先类类型?意味着一个函数可以将另一个函数当作它的返回值返回。看看 stackoverflow上关于这个的解释Usual原创 2015-05-13 13:58:12 · 961 阅读 · 0 评论 -
无法设置
出现这个问题 AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager GET:weburlString parameters:nil success:^(AFHTTPRequestOperation *operation, id respons原创 2015-05-06 11:37:30 · 700 阅读 · 0 评论 -
Swift Function & Closure
FunctionsFunctions are self-contained chunks of code that perform a specific task. You give a function a name that identifies what it does, and this name is used to “call” the function to perform原创 2015-05-14 15:34:02 · 484 阅读 · 0 评论 -
NSNumber 转NSString
// 格式转换NSNumberFormatter *numberFormatter = [NSNumberFormatter new];// 获取值[numberFormatter stringFromNumber:NSNumberValue]原创 2015-05-07 09:15:23 · 444 阅读 · 0 评论 -
Swift Optionals & Implicitly Unwrapped Optionals
以下内容摘自:https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html#//apple_ref/doc/uid/TP40014097-CH5-ID309As described above, optionals原创 2015-05-14 19:34:14 · 712 阅读 · 0 评论 -
stretching image-based content
UIImageView 的contentStretch 这个属性已经被废弃了,可以通过UIImageView使用一个stretchable image来实现通过UIImage的stretchableImageWithLeftCapWith:topCapHeight:这个方法来创建一个可拉伸image原创 2015-05-18 11:36:54 · 290 阅读 · 0 评论 -
the-target-overrides-the-other-ldflags-build-setting-defined-in-pods-pods
http://stackoverflow.com/questions/18376416/the-target-overrides-the-other-ldflags-build-setting-defined-in-pods-pods事情是这样的 weibo sdk 叫我在the other flags中添加-objc,结果pods就一直报错Downloading depe原创 2015-07-26 21:55:55 · 1438 阅读 · 0 评论 -
今天要用到可折叠的tableview 折腾了半天
https://developer.apple.com/library/ios/samplecode/TableViewUpdates/Introduction/Intro.html下面是解决方案 apple也给出了解决方案 https://developer.apple.com/library/ios/samplecode/TableViewUpdates/Introduction/Intr原创 2015-07-27 19:56:08 · 406 阅读 · 0 评论 -
Do not warn about base configuration if unnecessary
老是叫我升cocopods 升了之后 这个是没配置好 之前的配置遗留在项目配置文件中 新的pod没法进行新的设置 才出现的问题https://github.com/CocoaPods/CocoaPods/issues/2633I've hit the same issue just now and it took me a while to figure out how原创 2015-07-27 10:27:29 · 625 阅读 · 0 评论 -
tableview & collection view
例子:TableView Fundamentals for iOS原创 2015-08-25 15:10:28 · 455 阅读 · 0 评论 -
TestFlight使用流程
TestFlight使用流程注册一个新的邮箱 exp:[email protected]使用该邮箱去注册新的appleid,appleid名为[email protected]打开developer.apple.com 选择Menuber Center,输入开发者账户、用户名 sign in选择iTunes Connect,选中 用户与职能 ,添加iTunes connec原创 2015-07-30 10:14:23 · 4366 阅读 · 0 评论 -
iOS中各种图片的要求 App Icons on iPad and iPhone
https://developer.apple.com/library/ios/qa/qa1686/_index.html翻译 2015-07-20 11:26:08 · 431 阅读 · 0 评论 -
objectiveC【语法】修饰符 static extern const
http://blog.csdn.net/xpwang168/article/details/8087143http://casatwy.com/iosying-yong-jia-gou-tan-wang-luo-ceng-she-ji-fang-an.html原创 2015-07-31 22:39:22 · 343 阅读 · 0 评论 -
UICollection view or Tableview 使用
UICollection view的使用(TableView同理首先使用自定义UICollectionViewCell的话 1、需要先创建继承UICollectionViewCell的class 2、将界面中的collectionview 的cell连接到calss中(这边需要先将界面上的cell对应的class设为我们的自定义class,不然无法建立IBOutlet3、 在c原创 2015-07-18 23:29:22 · 372 阅读 · 0 评论 -
读取项目中的资源
有时会直接通过拉拽的方式,将文件添加到项目中,这时一定要注意3点Destination: 一定要勾选 (不然只是一定引用 添加进来了 到时项目要是提交的时候 就会缺少文件Added folders:Add to target: 一定要勾选今天碰到的问题是 给项目添加caf声音文件 结果 pewPewPath读出来一直是nil,估计是没有添加到targetNSString原创 2015-07-23 10:34:00 · 352 阅读 · 0 评论 -
调试已经部署了的App
https://developer.apple.com/library/ios/qa/qa1747/_index.html#//apple_ref/doc/uid/DTS40011341不通过xcode设置->隐私->诊断与用量 格式为__通过xcodewindow->devices->查看设备上的logxcode6会列出low memory name是Unknown,ty翻译 2015-08-04 16:44:34 · 511 阅读 · 0 评论 -
NSOperation 数据返回后更新tableview
很蛋疼 我是通过delagate的中方法来执行reload的。Log显示数据返回很快,但是reload貌似就是咩有起到作用。然后我又尝试了在completion block做reload,尼玛,还是木有结果,。突然想到,这些个可都不是在主线程啊。google了一下http://stackoverflow.com/questions/3615329/uiview-and-uitableview-原创 2015-04-24 14:03:42 · 440 阅读 · 0 评论 -
iOS xib 界面构造心得
1:自定义view自定义的cocoa touch view继承 UIView类;然后创建新的xib,设置其相关联的class;在xib中需要先创建各个view的IBoutlet,这样Files's Owner才能将其IBoutlet绑定。2:AutoLayout使用autolayout时,可以先将整个页面布局先拉拉好,然后再创建相对应的constraints,这样做的话,Int原创 2015-04-14 17:38:13 · 395 阅读 · 0 评论 -
FMDB使用
想要在ios上使用sqlite3,可以使用fmdb (https://github.com/ccgus/fmdb)参考文章:1http://blog.csdn.net/xyz_lmn/article/details/9312837使用方法:添加fmdb到项目,同时添加libsqlite3.dylib。如何添加libsqlite3.dylib:如图原创 2015-01-22 09:45:55 · 451 阅读 · 0 评论 -
Cocoa Application Competencies For iOS (ios中Cocoa Applcaition 的一些能力
From developer apple :https://developer.apple.com/library/ios/documentation/General/Conceptual/Devpedia-CocoaApp/Animation.html------------------Storyboard----------------------1.一原创 2015-03-15 12:15:42 · 581 阅读 · 0 评论 -
Duplicate symbol issues/////linker command failed with exit code 1 (use -v to see invocation)
事情是这样的通过cocoapod安装SSZipAcrhive,安装成功之后出现了下面这个错误。5 duplicate symbols for architecture X86_655 ?????=> 查看stackoverflowhttp://stackoverflow.com/questions/3231948/duplicate-symbol-原创 2015-03-19 09:17:11 · 548 阅读 · 0 评论 -
simple and reliable Threading with NSOperation
from: https://developer.apple.com/library/ios/technotes/tn2109/_index.html线程能解决两个方面的问题1 并行计算2 异步计算但是如果是这两个方面的事,就不好用线程了1周期性执行的任务 //2网路工作 //最好实用原生的networking APIs翻译 2015-03-26 09:07:29 · 371 阅读 · 0 评论 -
Cocoapad 安装 使用
谢谢作者的教程: http://code4app.com/article/cocoapods-install-usage1.首先自己的mac pro 默认安装了ruby$ gem sources --remove https://rubygems.org///等有反应之后再敲入以下命令$ gem sources -a http://ruby.taobao.org/$ gem s原创 2015-03-16 10:39:06 · 1795 阅读 · 0 评论 -
object-c block
Block对象是一个c-level的语法和运行时的功能。和C的函数很相似,但是执行代码的时候,but in addition to executable code they may also contain variable bindings to automatic (stack) or managed (heap) memory。A block can therefore maintain原创 2015-03-17 16:10:05 · 357 阅读 · 0 评论 -
AFNetworking库使用
NSURL *url = [NSURL URLWithString:@"http://hjob.sinaapp.com/xrwork/example.php"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFHTTPRequestOperation *operation = [[AFHTTPRequest原创 2015-03-17 12:20:29 · 357 阅读 · 0 评论 -
重复声明IBOutlet、 关闭ios simulator 后项目无法进入AppDelegate.m [狗血的项目经验]
说起来也是有点狗血,事情是这样子的。我在编辑xib的时候,重复将collection view 拖到了.m文件中生成了一条@property (weak, nonatomic) IBOutlet UICollectionView *asd;的outlet然后一直给我报错,什么 no key setValue 很后悔没有截图 因为我删除这个outlet 后可以了,重新添加进去就不原创 2015-01-20 15:51:47 · 604 阅读 · 0 评论 -
MX4 Pro 连接mac developer
资源来自:http://blog.csdn.net/oliver102/article/details/93494491.system_profiler SPUSBDataType2.vi ~/.android/adb_usb.添加mx4 pro 的Vendor ID,格式如下:10x2a453.重启AS就能发现手机已经能够识别了。sys原创 2015-03-22 22:04:54 · 995 阅读 · 0 评论 -
xcode Prefix.pch文件
Prefix.pch文件 M原创 2015-03-13 15:37:38 · 359 阅读 · 0 评论 -
Core Dat
CoreData:你可以使用在你的程序中使用Core Data来管理modle object(M in MVC)。Core Data是一个object-graph management和persistence framework.同时:Core Data stack:Managed Object:一个managed object 是MVC中的M,代表原创 2015-03-13 10:53:23 · 472 阅读 · 0 评论 -
xcode 有时语法不会高亮
有些时候语法不会高亮,这时只要clean一下project就OK了。原因展示不清楚,内存不足?原创 2015-03-23 09:19:29 · 1038 阅读 · 0 评论 -
MAC 各种使用
真他妈受够了鼠标 我想能不能完全脱离鼠标所以今天把所有不熟悉的快捷键全部都纪录下来!-----------------------------opt + cmd + esc 强制退出程序原创 2015-01-09 15:35:51 · 639 阅读 · 0 评论 -
iOS file system
常用的一些iOS app使用的目录原创 2015-03-17 17:30:50 · 579 阅读 · 0 评论 -
sublime 设置识别语言
cmd+shift 输入语言入“object-c”自动跳出 Set Syntax:Object-C这样就能识别OC的代码片段了..个人觉得用sublime做代码片段管理比较好原创 2015-04-05 16:15:02 · 7808 阅读 · 0 评论 -
cocoapods安装Afnetworking后,无法include<AFNetworking/AFNetworking.h>
反复卸载安装AFNetworking还是不行,然后查找到了这个issues https://github.com/CocoaPods/CocoaPods/issues/2695解决方法怎么有点牛头不对马嘴的feel。解决方法是给我的测试项目也配上Configuratioon File,分别是Pods.debug和Pods.release。这样就傻乎乎地解决了,这是什么问原创 2015-04-06 16:09:01 · 5033 阅读 · 0 评论 -
How to Add Core Data to an existing Utility Application
这个问题 你妹 本来就是要折腾 =/=原创 2015-08-06 11:23:09 · 528 阅读 · 0 评论