- 博客(18)
- 资源 (6)
- 收藏
- 关注
原创 使用Xcode检测循环引用
- (void)viewDidLoad{ self.view.backgroundColor =[UIColor whiteColor]; NSMutableArray *firstArray = [NSMutableArray array]; NSMutableArray *secondArray = [NSMutableArray array]; [firstA
2016-03-30 15:42:25 4874
原创 Swift 实例方法&类型方法(九)
override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. let counter = Counter() counter.reset()
2016-03-29 00:12:06 829
原创 iOS开发- 实现类似于陌陌点点和探探首页切换效果类似
https://github.com/Zhangjingwang1993/XSmomoStyle
2016-03-28 17:49:11 7167
原创 iOS一句话搞定图片上传,数据请求(基于AFN)[持续更新]
只提供了上传一张图片的方法因为要跟服务器交互不好测试,后期会加上多张图片的上传方法https://github.com/Zhangjingwang1993/XSNetworking
2016-03-25 14:31:44 1036
原创 Swift 网络请求, 图片加载, tableView, collectionView, webView(八)
Demo 下载地址 https://github.com/Zhangjingwang1993/AlamofireWithHanekeSwift.git
2016-03-22 00:07:28 1734
原创 iOS开发之按照模型某一属性排序
今天有个需求按照价格把数据模型进行排序 ## -.-描述: 有一个装满Model的数组 self.dataSourceArrayNSArray *array = [self.dataSourceArray sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { //给
2016-03-17 19:07:46 5358 5
原创 Swift 正向传值以及利用闭包(closure)实现反向传值(七)
直接上代码吧 - - Demo地址 https://github.com/Zhangjingwang1993/closureDemo.git// MainVclet button = UIButton.init(type: UIButtonType.Custom)button.frame = CGRectMake(20, 100, 50, 50);button.backgroundColo
2016-03-17 11:32:23 939
原创 Swfit UITableView的使用(六)
详细请移步github https://github.com/Zhangjingwang1993/Swift.gitvar tableViewself = UITableView()var arrayData = ["cell1", "cell2", "cell3", "cell4", "cell5"]var buttonRight = UIButton()创建TableViewfunc cre
2016-03-16 14:09:52 660
原创 Swift 函数的基本写法与使用元组实现返回多个值(四)
无参数无返回值 let studentScores = [12, 55, 65, 38, 99, 88, 0] func studySwift() ->Void { print("无参无返回值") }无参数有返回值 func studySwift1() ->String { let name:String = "无参数有返回值
2016-03-15 17:34:45 5334
原创 Swift 条件选择(if Switch),循环结构(三)
switch var i = 0 switch i { case 0: print("0") case 1: print("1") default: print("default") }不用加上break, Swift的Switch
2016-03-15 15:04:51 2341
原创 Swift 数组,字典
https://github.com/Zhangjingwang1993/Swift.gitSwift 语言提供Arrays、Sets和Dictionaries三种基本的集合类型用来存储集合数据。数组(Arrays)是有序数据的集。集合(Sets)是无序无重复数据的集。字典(Dictionaries)是无序的键值对的集 可变数组var someInts = [Int]() // 空数组var g
2016-03-15 12:10:28 662
原创 Swift 基本数据类型,常/变量声明(一)
https://github.com/Zhangjingwang1993/Swift.git /// 项目不太忙, 撸撸Swift变量 使用var声明var str:String = "dd"str = "GG"print(str)常量 使用let声明let count:Int = 16print(count)整型Int, Int8, Int16, Int32, Int64UInt, UI
2016-03-15 11:57:07 406
原创 [iOS RunLoop初识](一)
前言RunLoop是iOS/OS开发中比较基础的一个概念,在苹果开发中用在事件处理,延迟加载,屏幕刷新等功能的处理,其实抛开语言,RunLoop是一个的架构模式,也就是RunLoop不仅仅局限于iOS开发。RunLoop的概念一般来讲,一个线程一次只能执行一个任务,执行完成后线程就会退出。如果我们需要一个机制,让线程能随时处理事件但并不退出RunLoop与线程每条线程都有唯一的一个与之对应的RunL
2016-03-11 16:40:23 517
原创 GCD使用与技巧(续)
dispatch_once_t必须是全局或static变量 毕竟非全局或非static的dispatch_once_t变量在使用时会导致非常不好排查的bugstatic dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ // 单例 });dispatch_queue_create,创建队列用的,它的参数只有
2016-03-09 17:56:23 616
原创 iOS开发之获取系统键盘的详细信息
通过这篇文章,能对系统自带的一些东西, 有一点深入的理解 /** * UIKIT_EXTERN NSString *const UIKeyboardWillShowNotification; * UIKIT_EXTERN NSString *const UIKeyboardDidShowNotification; * UIKIT_EXTERN NSString *
2016-03-09 16:11:51 2308
原创 iOS开发之自定义键盘(一)
这里我以两个textfield为例//** 这里没有把键盘写成一个单独的View, 只提供一个思路 /{ UITextField *textPhone; UITextField *textCarNo;}// 自定义一个View@property (nonatomic, strong) UIView *bottomView;// textField@property (non
2016-03-08 17:14:13 722
原创 iOS开发之信用卡 扫描识别卡号信息(card.io)
使用CocoaPodspod 'CardIO'或者Demo下载https://github.com/AllLuckly/card.io-iOS-SDK Xcode版本: Xcode 7.2.1导入如下所示的库Accelerate.frameworkMobileCoreServices.frameworkCoreMedia.frameworkAudioToolbox.frameworkAV
2016-03-03 16:42:45 3453 2
原创 iOS如何获取设备的UUID
方法一 最简单的方法: 直接使用 iTunes 点击箭头所标记的位置, 会显示设备的一些信息,点击序列号,之后会显示UUID, 之后复制就得到了你想要的 方法二 UIDevice *myDevice = [UIDevice currentDevice];NSString *deviceUDID = [myDevice uniqueIdentifier];
2016-03-01 22:23:08 2256
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人