随笔分类 -  iOS

摘要:参考内容,点击。 阅读全文
posted @ 2019-01-11 16:57 MaricoSun
摘要:.h文件 .m文件 阅读全文
posted @ 2017-11-30 11:40 MaricoSun 阅读(195) 评论(0) 推荐(0)
摘要:首先初始化,这就不细说了,三个代理都写上: 一、自动弹出键盘 以往的写法: 实现如上的代码就可以了,但是如果把searchbar写到导航条上,发现这么写完全是没作用的。修改: 二、搜索输入时禁止searchBar上移隐藏导航条 三、修改searchBar取消按钮的颜色和文字 四、显示searBar的 阅读全文
posted @ 2017-05-17 17:55 MaricoSun 阅读(3906) 评论(0) 推荐(0)
摘要:[[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTintColor:[UIColor whiteColor]]; [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBa... 阅读全文
posted @ 2017-05-16 13:43 MaricoSun 阅读(1599) 评论(0) 推荐(0)
摘要:// // XCache.swift // UITablViewTest // // Created by Marcio on 2017/2/14. // Copyright © 2017年 Marcio. All rights reserved. // import UIKit class XCache: NSObject { /** * 读取缓存大小 ... 阅读全文
posted @ 2017-02-15 17:17 MaricoSun 阅读(2428) 评论(0) 推荐(0)
摘要:// // XGIFView.swift // UITablViewTest // // Created by Marico on 2017/2/14. // Copyright © 2017年 Marico. All rights reserved. // import UIKit import ImageIO import QuartzCore /** * MD5字符转换需要一... 阅读全文
posted @ 2017-02-15 15:01 MaricoSun 阅读(2520) 评论(0) 推荐(0)
摘要:具体实现如下: 关于UIGraphicsBeginImageContext 阅读全文
posted @ 2016-10-28 10:34 MaricoSun 阅读(174) 评论(0) 推荐(0)
摘要:升级pods后更新出现这样的问题。。。? 查看下pods的版本: 1.0.1 修改的方法为: Podfile内容更改: 这样后再: ok! 阅读全文
posted @ 2016-10-18 11:25 MaricoSun 阅读(235) 评论(0) 推荐(0)
摘要:对视图直接设置alpha属性的值会导致其子控件也变得半透明,而通常我们的需求是:背景半透明而其子控件不透明。 一、 ImageView设置一张透明的图片。 二、使用colorWithWhite:alpha:方法 这是使用比较多的方法,white后面的参数表示灰度,从0-1之间表示从黑到白的变化,al 阅读全文
posted @ 2016-08-03 15:52 MaricoSun 阅读(2368) 评论(0) 推荐(0)
摘要:用到的知识就是swift的闭包原理。 swift页面:返回的值是一个字典 在button点击的方法里面实现: 在需要实现闭包的方法: oc 页面: 在点击页面跳转的方法里面如下实现: 注意的是:这是由oc页面跳转到swift页面,反向传值。 阅读全文
posted @ 2016-07-27 21:25 MaricoSun 阅读(879) 评论(0) 推荐(0)
摘要:一、UILabel 二、UIButton 三、UIImageView 代码地址:https://github.com/marico-sun/NDSwift.git 阅读全文
posted @ 2016-07-25 22:40 MaricoSun 阅读(2711) 评论(0) 推荐(0)
摘要:一、 银联支付 本地没有其他的环境配置,只需要在支付时从服务器获取交易流水号(TN),然后调取支付控件,支付完成之后会通知商户后台以及客户端,,相关demo和SDK见官网。银联支付。 二、 微信支付 微信支付需要配置appkey,在app启动时注册appkey,例如(ios):BOOL value 阅读全文
posted @ 2016-07-18 16:07 MaricoSun 阅读(364) 评论(0) 推荐(0)
摘要:1 - (void)GCDMethed{ 2 // 后台执行 3 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ 4 5 // 后台执行的操作 6 NSLog(@"后台操作"); 7 }); 8 ... 阅读全文
posted @ 2016-07-01 14:35 MaricoSun 阅读(254) 评论(0) 推荐(0)
摘要:加入你只想输入字母,数字而不能输入汉字,如图: textfiled实现代码: 在代理方法中实现如下代码: 阅读全文
posted @ 2016-05-03 11:27 MaricoSun 阅读(2196) 评论(0) 推荐(0)
摘要:.h 文件 .m文件 阅读全文
posted @ 2016-04-28 17:35 MaricoSun 阅读(1789) 评论(1) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2015-09-15 11:32 MaricoSun 阅读(7) 评论(0) 推荐(0)