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

浙公网安备 33010602011771号