会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
依然哎
博客园
首页
新随笔
联系
订阅
管理
2016年2月
关于 tabelviewcell 中 怎么让每个 cell 的 head view 随着 tabelviewhead 滚动
摘要: 今天遇到了一个问题,在写 tabelview 的时候,我设置了一个 self.tabelview.tabelHeadview,每个 cell 的 headview 都有高度,但是我希望使cell的 headview 随着一起滚动 但是 cell 滚动到一定程度后 headview 会停留一段时间,让
阅读全文
posted @ 2016-02-12 19:45 依然哎
阅读(156)
评论(0)
推荐(0)
2015年12月
swift-单例的写法
摘要: OC 中单例的使用+ (instancetype)sharedManager { static id instance; static dispatch_once_t onceToken; NSLog(@"%ld", onceToken); dispatch_once(&on...
阅读全文
posted @ 2015-12-16 01:07 依然哎
阅读(326)
评论(0)
推荐(0)
swift-懒加载的写法
摘要: 懒加载的格式如下:lazy var demoView: UIView = { let v = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) v.backgroundColor = UIColor.redColor()...
阅读全文
posted @ 2015-12-16 00:41 依然哎
阅读(419)
评论(0)
推荐(0)
swift 的基本属性-计算型属性
摘要: didSet 的使用在 OC 中,我们通常希望在给某一个变量赋值之后,去做一些额外的操作最经典的应用就是在自定义 Cell 的时候,通过模型的设置方法完成 Cell 的填var length: Int? { didSet { timeStr = String(format: "%...
阅读全文
posted @ 2015-12-16 00:37 依然哎
阅读(366)
评论(0)
推荐(0)
swift 的 一些基本的用法
摘要: 学了写 swift ,这里简单的列出 swift 的用法//传统的 for 循环的写法for var i = 0;i<10;i++ { print(i)}//..i 的值为0~9,不包含10for i in 0..<10 { print(i)}//...i 的值为0到10for ...
阅读全文
posted @ 2015-12-15 13:39 依然哎
阅读(268)
评论(0)
推荐(0)
自定义写一个提示框
摘要: //新创建一个类#import typedef NS_ENUM(NSInteger, XFNoticesStyle) { XFNoticesStyleSuccess = 0, XFNoticesStyleFail = 1,};@interface XFNotices : UIV...
阅读全文
posted @ 2015-12-10 16:37 依然哎
阅读(154)
评论(0)
推荐(0)
iOS9增至白名单
摘要: 在 info.plist添加以下值App Transport Security Settings Dictionary Allow Arbitrary Loads Boolean YES
阅读全文
posted @ 2015-12-09 00:56 依然哎
阅读(147)
评论(1)
推荐(0)
动态实时监听文本框中内容的变化
摘要: @property (strong, nonatomic) UITextField *iPhoneText;@property (strong, nonatomic) UITextField *passwordText;@property (strong, nonatomic) UIButton *...
阅读全文
posted @ 2015-12-08 18:50 依然哎
阅读(534)
评论(0)
推荐(0)
点击空白处以及返回 return 键隐藏键盘
摘要: ///返回键盘处理方法1此方法只能针对继承自 UIControl的子类适用-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self.view endEditing:YES];}方法2//添加手势方法监听键盘处理的...
阅读全文
posted @ 2015-12-08 17:57 依然哎
阅读(284)
评论(0)
推荐(0)
iOS原生的布局写法
摘要: 方法1:使用 HV方式self.backImageView.translatesAutoresizingMaskIntoConstraints = NO; [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualForm...
阅读全文
posted @ 2015-12-08 17:39 依然哎
阅读(214)
评论(0)
推荐(0)
下一页
公告