- 浏览: 236633 次
- 性别:
- 来自: 天津
文章分类
最新评论
-
yulanlian:
...
实现在删除数据后,自增列的值连续 -
RonQi:
楼主写的很好,支持原创!
Google Protocol Buffers
退回输入键盘: - (BOOL) textFieldShouldReturn:(id)textField{ [textField resignFirstResponder]; } CGRect CGRect frame = CGRectMake (origin.x, origin.y, size.width, size.height);矩形 NSStringFromCGRect(someCG) 把CGRect结构转变为格式化字符串; CGRectFromString(aString) 由字符串恢复出矩形; CGRectInset(aRect) 创建较小或较大的矩形(中心点相同),+较小 -较大 CGRectIntersectsRect(rect1, rect2) 判断两矩形是否交叉,是否重叠 CGRectZero 高度和宽度为零的/位于(0,0)的矩形常量 CGPoint & CGSize CGPoint aPoint = CGPointMake(x, y); CGSize aSize = CGSizeMake(width, height); 设置透明度 [myView setAlpha:value]; (0.0 < value < 1.0) 设置背景色 [myView setBackgroundColor:[UIColor redColor]]; (blackColor;darkGrayColor;lightGrayColor;whiteColor;grayColor; redColor; greenColor; blueColor; cyanColor;yellowColor;magentaColor; orangeColor;purpleColor;brownColor; clearColor; ) 自定义颜色: UIColor *newColor = [[UIColor alloc] initWithRed:(float) green:(float) blue:(float) alpha:(float)]; 0.0~1.0 320X480 480X320 状态栏高 20 像素高 导航栏 工具栏 44像素高 隐藏状态栏: [[UIApplication shareApplication] setStatusBarHidden: YES animated:NO] 横屏: [[UIApplication shareApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight]. orientation == UIInterfaceOrientationLandscapeLeft window=[[UIWindow alloc] initWithFrame:[UIScreen mainScreen] bounds];全屏 自动适应父视图大小: aView.autoresizingSubviews = YES; aView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); 定义按钮 UIButton *scaleUpButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [scaleUpButton setTitle:@"放 大" forState:UIControlStateNormal]; scaleUpButton.frame = CGRectMake(40, 420, 100, 40); [scaleUpButton addTarget:self action:@selector(scaleUp) forControlEvents:UIControlEventTouchUpInside]; 设置视图背景图片 UIImageView *aView; [aView setImage:[UIImage imageNamed:@”name.png”]]; view1.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image1.png"]]; UISlider *slider = (UISlider *) sender; NSString *newText = [[NSString alloc] initWithFormat:@”%d”, (int)(slider.value + 0.5f)]; label.text = newText; 活动表单 <UIActionSheetDelegate> - (IBActive) someButtonPressed:(id) sender { UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@”Are you sure?” delegate:self cancelButtonTitle:@”No way!” destructiveButtonTitle:@”Yes, I’m Sure!” otherButtonTitles:nil]; [actionSheet showInView:self.view]; [actionSheet release]; } 警告视图 <UIAlertViewDelegate> - (void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex { if(buttonIndex != [actionSheet cancelButtonIndex]) { NSString *message = [[NSString alloc] initWithFormat:@”You can breathe easy, everything went OK.”]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”Something was done” message:message delegate:self cancelButtonTitle:@”OK” otherButtonTitles:nil]; [alert show]; [alert release]; [message release]; } } 动画效果 -(void)doChange:(id)sender { if(view2 == nil) { [self loadSec]; } [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1]; [UIView setAnimationTransition:([view1 superview]?UIViewAnimationTransitionFlipFromLeft:UIViewAnimationTransitionFlipFromRight)forView:self.view cache:YES]; if([view1 superview]!= nil) { [view1 removeFromSuperview]; [self.view addSubview:view2];
}else {
[view2 removeFromSuperview]; [self.view addSubview:view1]; } [UIView commitAnimations]; }
发表评论
-
ios 国际化相关
2011-10-08 18:49 1415添加国际化 1. 代码中使用字符串的地方 使用 NS ... -
ios开发基础知识 - 1
2011-09-26 21:51 1089输出 command+shift+r NSLog(@& ... -
ios---超链接的UILabel教程
2011-09-26 21:50 1492超链接的UILabel教程 -
ios开发基础问题总结
2011-09-26 21:49 1246订阅 1,如何进入应用后首 ... -
UILabel用法
2011-09-26 20:45 1782/设置换行 UILabel*label; / ... -
IPhone之UIScrollView [转载]
2011-09-22 15:55 862原文地址:IPhone之UIScrollView作者:飞 ... -
手势识别
2011-09-03 17:19 860注册: UISwipeGestureReco ... -
“碰撞”探测
2011-08-21 14:28 811首先要向大家说明的是,所谓“碰撞”探测没有大家想想 ... -
coco2d地图显示相关类
2011-08-21 07:55 1552摘自:知易教程 Cocos2d-iPhone 实现地图 ... -
Cocos2D 的事件处理机制
2011-08-21 07:21 1563摘自:知易教程 系统当前场景对象包含多个层 ... -
cocos2d游戏开发,常用工具集合
2011-08-20 19:40 798位图字体工具Bitmap Font ToolsBMFon ... -
iPhone OS 的 Touche 事件
2011-08-20 19:34 1306知易教程 基础知识 在开始介绍 iPhone OS ... -
iPad, iPhone, and Aspect Ratio
2011-08-05 11:58 918好,现在处理iphone上 ... -
Retina Display and Cocos2D
2011-08-05 11:57 1297最新版本的cocos2d完全 ... -
网络编程总结
2011-08-04 15:41 797一:确认网络环境3G/WIFI 1. 添加源文件和fra ... -
Cocos2D界面切换方式
2011-08-04 15:37 1601CCTransitionFade, //渐隐 ... -
Protocol协议的用法
2011-08-04 15:30 1220一、说明 两个类进行通讯,用协议就比较方便。 (书 ... -
IOS开源项目和官方例子汇总
2011-08-04 14:22 1812开源项目: 扫描wifi信息:http://code. ... -
cocos2d场景和UIViewController视图的切换
2011-08-04 14:20 1582cocos2d中从场景切换到UIViewController视 ... -
视差滚动
2011-08-02 21:09 1098我们已经有一个很酷的飞船在屏幕上了,但是,它看起来就好 ...
相关推荐
退回输入键盘 2 CGRect 2 CGPoint & CGSize 3 设置透明度 3 设置背景色 3 自定义颜色 3 竖屏 3 横屏 3 状态栏高 3 导航栏、工具栏高 3 隐藏状态栏 3 ...iPhone游戏中既播放背景音乐又...iphone更改键盘右下角按键的type 45
收集了IOS开发过程中常见的错误和需要注意的要点。
iphone开发笔记.iphone开发笔记.iphone开发笔记.iphone开发笔记.
iphone开发学习笔记(1)--NSLog
iPhone开发基础教程_学习笔记.docx
本压缩包中包含了Iphone开发中常用到的技术总结笔记,五六十中技术方法以及季节方案,包括内存管理,方法回调,获取当前地点,自定义CELL,VIew圆角等等等,太多的奶水包,是我开发中所有的精华所在,只有你不知道的...
iPhone笔记-Object-c基础总结
这份文档是我从事ios开发一年以来,总结工作中常用到的200余个ios小知识点,并添加可以调试观看的实例代码,方便iso开发者学习和交流,弄清楚这些,基本从事ios开发没什么问题。
开发笔记,ios中关于入口类的相关方法的阐述,清晰的通俗
刊首语 征稿 在Android平台下定制系统的主屏幕 IPhone开发内存管理 Three20的使用 iOS开发者计划申请流程攻略 雅虎画报IPad版本的开发经验介绍
Cocoa基本原理指南.pdf Dashcode_UserGuide.pdf iPhonei&Touch.doc Objective-C Beginner's Guide.pdf
最近正在开发小程序相关的需求时,遇到了一个问题——ios高版本的安全区域,即iPhoneX及以上拥有的“刘海儿”等可滑动区域会与你开发的内容重合。 幸运的是,在小程序上我们只需要考虑底部的底部Home Indicator上滑...
千锋3g培训 OC源码以及课堂笔记 按日期分类 每天代码都有
swift_study详细信息!Swift iPhone App 开发入门注的示例代码用于学习 Swift 开发
ios开发的一些经验 和一些很使用的快捷键 适合初学者
TimeNote为珍惜时间,珍惜往事的人潜心开发的软件,一款具有独立文件与事件预测的跨平台日程管理软件(支持Android、IPhone与各PC平台)。本软件采用独家原创数据解码格式,支持云端异步操作,并能对普遍使用的ICS文件...
苹果的iPhone和iPad应用开发都指定使用同一开发语言:Objective-C语言。这是一种简单的面向对象编程语言,它的基础是C程序设计语言。Objective-C不仅功能强大,而且简单易学。Objective-C已经成为苹果系统下应用程序...
您需要安装有效的iPhone开发证书。 必须安装Xcode以及适用于iOS版本的SDK。 用法 fruitstrap [-d] -b <app> [device_id] 安装应用程序后,可选的-d标志将启动远程GDB会话。 必须是iPhone应用程序捆绑包,而不是...