随笔分类 -  02.IOS基础UI控件

摘要:*********用户登录,回车的监听(代理模式UITextFieldDelegate)#import "HMViewController.h"@interface HMViewController () @property (weak, nonatomic) IBOutlet UITextFiel... 阅读全文
posted @ 2015-07-30 21:20 iso 阅读(1226) 评论(0) 推荐(0)
摘要:***********取消按钮的监听和设置代理textField字数限制 UITextFieldDelegate#import "HMViewController.h"@interface HMViewController () @end@implementation HMViewControlle... 阅读全文
posted @ 2015-07-30 21:15 iso 阅读(479) 评论(0) 推荐(0)
摘要:#pragma mark - 答题区按钮点击方法- (void)answerClick:(UIButton *)button{ // 1. 如果按钮没有字,直接返回 if (button.currentTitle.length == 0) return; // 2. 如果有... 阅读全文
posted @ 2015-07-30 17:59 iso 阅读(211) 评论(0) 推荐(0)
摘要:创建备份区按钮和判断结果/** 创建备选区按钮 */- (void)createOptionButtons:(HMQuestion *)question{ // 问题:每次调用下一题方法时,都会重新创建21个按钮 // 解决:如果按钮已经存在,并且是21个,只需要更改按钮标题即可 ... 阅读全文
posted @ 2015-07-30 17:43 iso 阅读(180) 评论(0) 推荐(0)
摘要:#import "HMViewController.h"#import "HMQuestion.h"#define kButtonWidth 35#define kButtonHeight 35#define kButtonMargin 10#define kTotolCol ... 阅读全文
posted @ 2015-07-28 15:12 iso 阅读(310) 评论(0) 推荐(0)
摘要:数组的升序和降序- (void)sortWith:(NSArray *)array{ // 排序 array = [array sortedArrayUsingComparator:^NSComparisonResult(NSNumber *num1, NSNumber *num2) {... 阅读全文
posted @ 2015-07-27 15:01 iso 阅读(915) 评论(0) 推荐(0)
摘要:HMQuestion.h#import @interface HMQuestion : NSObject@property (nonatomic, copy) NSString *answer;@property (nonatomic, copy) NSString *icon;@property ... 阅读全文
posted @ 2015-07-27 14:53 iso 阅读(197) 评论(0) 推荐(0)
摘要:@interface HMViewController ()@property (nonatomic, strong) UIButton *cover; //阴影@end@implementation HMViewController//懒加载,阴影- (UIButton *)cover{ ... 阅读全文
posted @ 2015-07-27 14:46 iso 阅读(387) 评论(0) 推荐(0)
摘要:第三天******** 九宫格代码的现实@interface HMViewController ()/** 应用程序列表 */@property (nonatomic, strong) NSArray *appList;@end@implementation HMViewController- (N... 阅读全文
posted @ 2015-07-23 11:43 iso 阅读(236) 评论(0) 推荐(0)
摘要:第二天*******图片的放大,和缩小 (去掉自动的布局)-(IBAction ) zoomFrame:(UIbutton *) button{ CGRect frame= self.iconButton.frame; // CGRect frame= self.iconButton.bound... 阅读全文
posted @ 2015-07-21 18:46 iso 阅读(234) 评论(0) 推荐(0)
摘要:第一天(hello world)1>UIView所有的控件都继承UIView,倒位置,宽度和高度..UIButton UILable2>UIViewController .h 是声明属性和方法的(对外开放的属性和方法) .m 是做实现IBAction & IBOutletIB:Interface... 阅读全文
posted @ 2015-07-19 11:54 iso 阅读(123) 评论(0) 推荐(0)