首页
学习
活动
专区
工具
TVP
发布

ShaoYL

专栏作者
123
文章
145464
阅读量
39
订阅数
1.了解Objective-C语言
了解Objective-C语言 ** Objective-C 语言是“消息结构”(messaging structure) 类似C++ 、Java 是“函数调用”(function calling)** // messaging structure (Objective-C) Object *obj = [Object new]; [obj performWith:parameter1 and:parameter2]; // function calling (C++) Object *obj = new
用户1941540
2018-06-21
5900
UIScrollView
UIScrollView UIScrollView全部API学习。 //1.设定滚定条的样式 typedef NS_ENUM(NSInteger, UIScrollViewIndicatorStyle) { UIScrollViewIndicatorStyleDefault, // black with white border. good against any background 黑白边框 UIScrollViewIndicatorStyleBlack, // black only. small
用户1941540
2018-05-11
1.8K0
自定义View
自定义View 通过纯代码自定义控件 继承自系统自带的控件,写一个属于自己的控件 在 .h 文件中声明模型对象 @class@property(nonatomic,strong)Shop *shop; 目的:封装控件内部的细节,不让外界关心 步骤 新建一个继承UIView的类 在initWithFrame:方法中添加子控件 当控件第一次创建或者通过 init 和initWithFrame 创建都会调用 initWithFrame方法 但是通过Xib创建且不通过 init 或 initWith
用户1941540
2018-05-11
6910
封装模型
模型 概念 专门用来存放数据的对象 特点 一般直接继承自NSObject 在.h文件中声明一些用来存放数据的属性 首先创建实体类,具备属性,可用点语法 模型定义示例 @interface Shop : NSObject /** 名字 */ @property (nonatomic, strong) NSString *name; /** 图标 */ @property (nonatomic, strong) NSString *icon; /** 通过一个字典来初始化模型对象 */ - (instan
用户1941540
2018-05-11
9900
Quartz2D知识点聚合案例
Quartz2D知识点聚合 基本 //画图片 UIImage *image = [UIImage imageNamed:@"阿狸头像"]; [image drawInRect:rect]; //字体 NSString *title = @"标题"; NSMutableDictionary *atr = [NSMutableDictionary dictionary]; atr[NSFontAttributeName] = [UIFont syste
用户1941540
2018-05-11
5550
遮罩 HUD 指示器 蒙板 弹窗
遮罩 HUD 指示器 蒙板 弹窗 UIAlertView的使用<代理方法处理按钮点击> UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"警告" message:@"是否要删除它?" delegate:self cancelButtonTitle:@"是" otherButtonTitles:@"否", nil]; //加登录框 alertView.alertViewStyle = UIAlertViewStyleLoginA
用户1941540
2018-05-11
1.2K0
OC 实现一个TODO宏
实现一个TODO宏 转载http://blog.sunnyxx.com/2015/03/01/todo-macro/ 实现一个能产生warning的TODO宏,用于在代码里做备忘,效果: 下面一步步来
用户1941540
2018-05-11
1.2K0
iOS :Object-C 语言merge两个字典对象
Object-C 语言merge两个字典对象 - (id)mutableDictionaryCopyIfNeeded:(id)dictObj { if ([dictObj isKindOfClass:[NSDictionary class]] && ![dictObj isKindOfClass:[NSMutableDictionary class]]) { dictObj = [dictObj mutableCopy]; } return dictO
用户1941540
2018-05-11
2K0
自欺欺人的使用 NSTimer 销毁
自欺欺人的使用 NSTimer 销毁 Demo地址 1.NSTimer是要加到runloop中才会起作用。 常见的创建timer方式 // 第一种方式 @property (nonatomic , strong) NSTimer *timer; // 默认加入当前runloop的NSDefaultRunLoopMode self.timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(timerA
用户1941540
2018-05-11
1.8K0
1.了解Objective-C语言
了解Objective-C语言 ** Objective-C 语言是“消息结构”(messaging structure) 类似C++ 、Java 是“函数调用”(function calling)** // messaging structure (Objective-C) Object *obj = [Object new]; [obj performWith:parameter1 and:parameter2]; // function calling (C++) Object *obj = new
用户1941540
2018-05-11
7060
Objective-C中的@property和@synthesize用法
@代表“Objective-C”的标志,证明您正在使用Objective-C语言 Objective-C语言关键词,@property与@synthesize配对使用。 功能:让编译好器自动编写一个与数据成员同名的方法声明来省去读写方法的声明。 如: 1、在头文件中: C代码   @property int count;   等效于在头文件中声明2个方法: C代码   - (int)count;   -(void)setCount:(int)newCount;   2、实现文件(.m)中 C代码  
用户1941540
2018-05-11
1.4K0
没有更多了
社区活动
Python精品学习库
代码在线跑,知识轻松学
【玩转EdgeOne】征文进行中
限时免费体验,发文即有奖~
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·干货材料·成员作品·最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档