1.UIButton 创建不需要做内存管理 原因是:用button自己的便利构造器的方式来创建对象
例子:
UIButton *button =[UIButton buttonWithType:UIButtonTypeSystem];
2.指定button的位置和大小
例子:
but...
分类:
其他好文 时间:
2015-07-31 10:49:16
阅读次数:
98
//
// AppDelegate.m
//
//
// Created by dllo on 15/7/30.
// Copyright (c) 2015年 zhozhicheng. All rights reserved.
//
#import "AppDelegate.h"
@interface
AppDel...
分类:
移动开发 时间:
2015-07-31 09:06:12
阅读次数:
148
//
// AppDelegate.m
// UI02_UIButton
//
// Created by dllo on 15/7/29.
// Copyright (c) 2015年 zhozhicheng. All rights reserved.
//
#import "AppDelegate.h"
@inte...
分类:
移动开发 时间:
2015-07-31 09:04:52
阅读次数:
135
最近学习做一些小项目的的思路,也了解和掌握了一些新的知识。越深入的学,越觉得学编程不容易,那些大神,真心让我佩服。一、UIButton 有三种状态normal(普通状态) 默认情况 对应的枚举常量:UIControlStateNormalhighlighted(高亮状态) 按钮被按下去的时候(手指还...
分类:
移动开发 时间:
2015-07-30 19:25:38
阅读次数:
163
#pragma mark - 答题区按钮点击方法- (void)answerClick:(UIButton *)button{ // 1. 如果按钮没有字,直接返回 if (button.currentTitle.length == 0) return; // 2. 如果有...
分类:
移动开发 时间:
2015-07-30 18:48:51
阅读次数:
123
//设置按钮颜色 self.autoLoginCheckBox.layer.borderColor = [[UIColor redColor] CGColor]; //设置边框宽度 self.autoLoginCheckBox.layer.borderWidth = 1; //设置按钮为圆...
分类:
其他好文 时间:
2015-07-30 11:12:50
阅读次数:
139
这里的背景跟上面的差不多
不过这里要用到AppDelegate的单例进行传值
首先到AppDelegate.h文件中
#import
@interface WJJRootViewController : UITabBarController
//声明一UIButton属性 来记录当前按下的按钮
@property (nonatomic,strong) UIButton * select...
分类:
其他好文 时间:
2015-07-29 23:13:20
阅读次数:
341
假如你是用代码方式直接将控件(如UILabel、UIButton等)加到UITableView的cell中去的话,,,在出了-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)...
分类:
其他好文 时间:
2015-07-29 15:41:44
阅读次数:
125
第二个view声明一个block属性:@property (nonatomic, copy) void(^doTransferMsg)(NSString *_msg);然后传值方法里检查block是不是存在- (IBAction)transferText:(UIButton *)sender { i...
分类:
其他好文 时间:
2015-07-29 13:42:21
阅读次数:
86
方法一:头尾式动画- (IBAction)moveClick:(UIButton *) sender{ CGPoint center = self.head.center; switch (sender.tag) { case 1: center.y -= 10; b...
分类:
其他好文 时间:
2015-07-28 22:51:46
阅读次数:
181