按照教程初学IOS第一天demo1,实现点击切换字和颜色(有源码打包)
2016-07-17 11:26
501 查看
主要代码
#import "ViewController.h" @interface ViewController () @property (weak, nonatomic) IBOutlet UILabel *label; @end @implementation ViewController - (IBAction)redClick:(id)sender { //1.修改文字 self.label.text=@"This is redClick"; //2.修改颜色 self.label.textColor=[UIColor redColor]; //3.修改字体大小 self.label.font=[UIFont systemFontOfSize:30]; } - (IBAction)blueClick:(id)sender { self.label.text=@"This is blueClick"; self.label.textColor=[UIColor blueColor]; self.label.font=[UIFont systemFontOfSize:30]; } - (IBAction)greenClick:(UIButton *)sender { self.label.text=@"This is greenClick"; self.label.textColor=[UIColor greenColor]; self.label.font=[UIFont systemFontOfSize:30]; }http://download.csdn.net/detail/z2340868/9583257
相关文章推荐
- isKindOfClass和isMemberOfClass的区别
- iOS Core Graphics基础入门(2)
- iOS Core Graphics介绍
- keychain的使用 iOS
- XZ_iOS之转换坐标系
- iOS 【使用Xcode和Instruments调试解决iOS内存泄露】
- iOS耗电量测试
- 多线程的几种加锁方式详解
- iOS 侧滑栏实现的放大和缩小
- ios如何使用xib自定义单元格
- iOS 启动引导页面
- tableView使用SDWebImage加载图片时滚动优化
- iOS Core Graphics手写板
- iOS 【在iOS中自动检测内存泄漏】
- iOS - 内存管理十全大补丸——内存泄露检查实战总结
- iOS开发支付集成之支付宝支付
- iOS之深入了解控制器View的加载
- IOS 设备m3u8流媒体协议标签解析
- iOS-沙盒相关
- iOS 多线程: dispatch_barrier_async