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

由   YIem   撰写于    浏览:4443  评论:0
SetViewController *setVC = [[SetViewController alloc]init];// 注意坐标设置 setVC.view.frame = CGRectMake(-150, 0, 150, self.view.frame.size.height); [self addChildViewController:se

由   YIem   撰写于    浏览:3930  评论:0
self.seg = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"界面1", @"界面2", @"界面3", nil]];self.seg.frame = CGRectMake(100, 100, 200, 30); // 起始选中状态 self.seg.sele

由   YIem   撰写于    浏览:5420  评论:0
// 提示框 // 提示框的样式只有两种 中间 下方 UIAlertController *alertC = [UIAlertController alertControllerWithTitle:@"注意" message:@"你是傻逼" preferredStyle:UIAlertControllerStyleA

由   YIem   撰写于    浏览:3527  评论:0
// 容器视图控制器 self.secondVC = [[SecondViewController alloc] init]; // 将VC添加的原因 // 1. 事件沿VC传递 // 2. 防止VC释放而所属View未释放 [self addChildViewController:self.secondVC]; [self.view addSubvie

由   YIem   撰写于    浏览:3470  评论:0
NSUserDefaults 是全局变量 简单信息存储数据到本地// 用来向本地存储一些简单信息 NSUserDefaults *userD = [NSUserDefaults standardUserDefaults]; // 存入BOOL类型数据 [userD setBool:YES forKey:@"isLogin"]; // 删

由   YIem   撰写于    浏览:2956  评论:0
iOS-UI-Button按钮自定义图标-图片样式切换 UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];button.frame = CGRectMake(100, 300, 200, 50); // 正常状态 [button setBackgroundImage:[UII

由   YIem   撰写于    浏览:3274  评论: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.view

由   YIem   撰写于    浏览:3752  评论:0
// 按钮 button UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; button.frame = CGRectMake(100, 300, 50, 30);// button.backgroundColor = [UIColor redColor];// 设置标题

由   YIem   撰写于    浏览:4231  评论:0
//***// 文本输入框 - YIem的博客 // command + k 调出键盘 // command + shift + k 关联物理键盘 UITextField *field = [[UITextField alloc] initWithFrame:CGRectMake(label.frame.origin.x, label.frame.origi

由   YIem   撰写于    浏览:3692  评论:0
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(50, 50, 300, 50)]; // 设置文字内容 label.text = @"YIem 的博客"; // 设置文字颜色 label.textColor = [UIColor greenColor]; // 设置文

由   YIem   撰写于    浏览:3198  评论:0
iOS-UI-用for循环铺各色小方块for (CGFloat i = 0; i < 375; i+= 75) { for (CGFloat j = 0; j < 667; j+=83.375) { UIView *view = [[UIView alloc] initWithFrame:CGRectMake(i, j,

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

由   YIem   撰写于    浏览:3581  评论:0
iOS键盘回收-按return键盘回收-或者跳入下一个UITextFielf的代码// 把Text写成属性(延展)@property (nonatomic, retain) UITextField *field1;@property (nonatomic, retain) UITextField *field2;// 键盘回收(第一个UITextField)

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

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

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

由   YIem   撰写于    浏览:3192  评论:0
  新浪科技讯 1月12日早间消息,百度出卖血友吧事件继续发酵,网友在知乎发帖继续举报称,除血友吧外,还涉及不孕不育吧、糖尿病吧、癫痫吧等热门疾病吧被引入商业合作的吧主。据知乎网友ytytytyt调查统计,在3259个健康保健类吧中,有近40%的热门疾病吧已被卖。不过百度方面告诉新浪科技:病种吧已不允许引入商业合作。  不完全统计:40%热门疾病吧被卖约40

由   YIem   撰写于    浏览:3830  评论: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]init]

由   YIem   撰写于    浏览:4711  评论: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   撰写于    浏览:3921  评论:0
首先,“雷电OS”是不是一个OS。答案:不是。雷电OS是一堆预置应用的合集。---下面更新了一些好玩的证据------另外大家可以随意转载-----转载没问题,但是请不要在标题中同时出现小米(MIUI)和雷电,我只是澄清事实,无意为这两家公司引战。雷电的受害用户不止小米,只是这次360针对小米进行推广,所以显得小米用户比较多。雷电OS安装完成后,除了桌面和几

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

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