关键字 int 的文章


由   YIem   撰写于    浏览:2927  评论:0
// 自定义头部区域(UIView )tableView:(UITableView )tableView viewForHeaderInSection:(NSInteger)section{UIView *header = [[UIView alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];he[...]

由   YIem   撰写于    浏览:2924  评论:0
// 分区头名称(NSString )tableView:(UITableView )tableView titleForHeaderInSection:(NSInteger)section{return @"头头头";}// 分区脚部名称(NSString )tableView:(UITableView )tableView titleForFo[...]

由   YIem   撰写于    浏览:2600  评论:0
// 前景色 navigation.navigationBar.barTintColor = [UIColor cyanColor]; // 背景色// navigation.navigationBar.backgroundColor = [UIColor cyanColor];// 边框色 navigation.navigation[...]

由   YIem   撰写于    浏览:3905  评论:0
/********UIPageControl 页码********/ UIPageControl *pcr = [[UIPageControl alloc] initWithFrame:CGRectMake(100, 500, 200, 50)]; // 注意属性 // 注意, 如果不设置页码个数 控件不显示 pcr.numberOfPages[...]

由   YIem   撰写于    浏览:4482  评论:0
UISlide 滑动条UISlider *slide = [[UISlider alloc] initWithFrame:CGRectMake(100, 400, 300, 10)];// 重要属性 // 最小值 slide.minimumValue = 0; // 最大值 slide.maximumValue = 10; // 设置进度位置 sl[...]

由   YIem   撰写于    浏览:3190  评论:0
/****** UISwith 开关******/ // frame只有坐标生效, 大小无效由系统默认指定 UISwitch *swt = [[UISwitch alloc] initWithFrame:CGRectMake(100, 200, 0, 0)]; // 注意触发方式 [swt addTarget:self action:@sele[...]

由   YIem   撰写于    浏览:3248  评论:0
iOS-UI-创建3个UISlider-分别设置划过区域的颜⾊分别为红,黄,蓝-通过控制三个slider改变self.view的背景颜⾊#import "ViewController.h"@interface ViewController ()@property (nonatomic, retain) UISlider *red;@property[...]

由   YIem   撰写于    浏览:3153  评论:0
#import "ViewController.h" @interface ViewController ()@property (nonatomic, retain) UILabel *label;@end@implementation ViewController(void)dealloc{[_label release];[...]

由   YIem   撰写于    浏览:3712  评论:0
/******* 假夜间模式 *********/ // 开关 UISwitch *sw = [[UISwitch alloc] initWithFrame:CGRectMake(100, 200, 100, 100)]; [sw addTarget:self action:@selector(swAction:) forControlEvents[...]

由   YIem   撰写于    浏览:3275  评论:0
VC.m#import "ActivityDetailViewController.h"import "ActivityDetailView.h"@interface ActivityDetailViewController ()@end@implementation ActivityDetailViewController

由   YIem   撰写于    浏览:2929  评论:0
// 图片UIImageView UIImageView *imageV = [[UIImageView alloc] initWithFrame:self.view.frame]; // 设置图片 imageV.image = [UIImage imageNamed:@"BackGround"]; [self[...]

由   YIem   撰写于    浏览:3810  评论:0
// 随机颜色 view1.backgroundColor = [UIColor colorWithRed:arc4random() % 256 / 255.0 green:arc4random() % 256 / 255.0 blue:arc4random() % 256 / 255.0 alpha:1]; // 单独改变frame view[...]

由   YIem   撰写于    浏览:3800  评论:0
iOS键盘回收-按return键盘回收-或者跳入下一个UITextFielf#import "ViewController.h" @interface ViewController ()<UITextFieldDelegate>@property (nonatomic, retain) UITextField *fi[...]

由   YIem   撰写于    浏览:2944  评论:0
iOS-植物大战僵尸-UIVIew-UIImageView-#import "ViewController.h" @interface ViewController ()@end@implementation ViewController(void)viewDidLoad {[super viewDidLoad];// Do a[...]

由   YIem   撰写于    浏览:3720  评论:0
iOS-TOM猫-汤姆猫动画播放-UIImageVIew#import "ViewController.h" @interface ViewController ()@property (nonatomic, retain) UIImageView *img;@end@implementation ViewController([...]

由   YIem   撰写于    浏览:3831  评论:0
iOS-UI-View-实现七种颜色的--跑马灯效果-使用for循环铺view forin遍历颜色写在ViewController.m

由   YIem   撰写于    浏览:4978  评论:0
main.m#import <Foundation/Foundation.h>import "System.h"import "Developer.h"int main(int argc, const char * argv[]) {// 协议代理// 模拟点击环境 Developer *dev = [[Developer alloc][...]

由   YIem   撰写于    浏览:4713  评论:0
Objective-C考试- 蓝鸥3G-OC考试题 ※ 选择题(共40题,每题2分) 1、NSString *str = @“lanou”; [str retain]; [str autorelease];
此时str的引用计数是________。 答案:(D) A、0 B、1 C、2 D、以上[...]

由   YIem   撰写于    浏览:3587  评论:0
/* 完成以下需求 需求:1、定义 联系人类Contact。实例变量:姓名(拼⾳, ⾸字母大写)、性别、电话号码、住址、分组名称、年龄。 ⽅法:自定义初始化方法(姓名、电话号码)、显示联系⼈信息(重写description方法, 打印所有成员变量)。 2、在main.m中定义字典,分组管理所有联系人。分组名 为26个大写的英文字母。 3、可以[...]

由   YIem   撰写于    浏览:3288  评论:0
main.m/* 实现图书管理系统: 1、使⽤数组管理所有书籍。 2、数组可以添加、删除。 3、可以从数组根据书名查找书籍,并修改书籍的价格。 4、展⽰所有书籍清单(书名)。*/ // 创建 对象Book *book1 = [Book bookWithBookName:@"YIem" price:20]; Book *b[...]

由   YIem   撰写于    浏览:5286  评论:0
/*定义一个block,返回值为BOOL,有两个NSString参数。实现:判断字符串是否相等。*/ if 1 BOOL (^block)(NSString *a, NSString *b) = ^BOOL(NSString *a, NSString *b) { // return [a compare:b];[...]

由   YIem   撰写于    浏览:3011  评论:0
.main.m文件/* 定义Student类 1、属性有age,name,gender; 2、age使⽤用assign,name使⽤用retain,gender使⽤用copy; 3、重写age、name、gender的setter和getter⽅方法。 */if 0 Student *stu = [[Stude[...]

由   YIem   撰写于    浏览:3829  评论:0
// block // 定义一个block 无返回值 无参数 void (^block1)(void) = ^(void) { NSLog(@"甜甜"); }; // 调用一个block block1(); NSInteger (^block2[...]

由   YIem   撰写于    浏览:2701  评论:0
///************* 不同类型转换 ****** // 整型转NSString int a = 3; NSString *str = [NSString stringWithFormat:@"%d", a]; NSLog(@"%@", str); // NS[...]

由   YIem   撰写于    浏览:2957  评论:0
.main.m 代码 /********** 自定义类型对象的排序 *****************/ Person *per1 = [[Person alloc] initWithName:@"Long" age:22]; Person *per2 = [[Person alloc] initWithName:@[...]