IPhone
Jianle2546
Hello World
展开
-
使用MPMoviePlayerViewController播放视频
今天使用网易公开课的时候发现,它的视频播放还不错,自己之前做的那个实在太卡,没有缓冲没有线程,于是乎就打算修改一下。结合performselect使用线程感觉还是不错的。 头文件,里面主要是一个标志位,一个MPMoviePlayerViewController。//// PlayVideoViewController .h//// Created by L原创 2011-06-23 13:36:00 · 5375 阅读 · 3 评论 -
IOS_UIImageView图片自动拉伸
这个是使用一个切片,使其填充到整个NavigationBar上面。 - (void)viewDidLoad { [super viewDidLoad]; UIImage *smallImage = [UIImage imageNamed:@"hc_03.png"]; UIImageView *imageView = [[UIImageView alloc]原创 2011-12-07 13:04:16 · 10039 阅读 · 0 评论 -
Xcode4.2的第一个iPhone程序HelloWorld
开发环境:XCode4.2 操作系统:Lion 10.7.2 1.打开XCode,选择Create a new Xcode project; 2.新建一个空项目,Empty Application 3.Next.输入产品名称与公司名。其他不用填。 先简单介绍一下下面这三个东西,以后再研究。 Core Data 是数据库操作的一个组件 ARC是IOS原创 2011-11-28 19:46:12 · 2403 阅读 · 0 评论 -
IOS_禁用UIWebView的ActionSheet
- (void)webViewDidFinishLoad:(UIWebView *)webView { [webView stringByEvaluatingJavaScriptFromString:@"document.body.style.webkitTouchCallout='none';"]; } Customize the contextual menu of UIWebVie原创 2011-12-06 11:58:07 · 1936 阅读 · 0 评论 -
IOS_修改UIWebView链接的颜色
NSString *htmlString = [NSString stringWithFormat: @"" "" "<meta name='viewport'" "content='width=device-width;原创 2011-12-06 09:55:44 · 1529 阅读 · 0 评论 -
IOS_修改TableView的删除按钮的文本
//修改删除按钮的文字 -(NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath { return @"删除"; }原创 2011-12-05 10:42:34 · 3812 阅读 · 0 评论 -
iPhone App 文件操作
iPhone App获取文件教程是本文要介绍的内容,对于一个运行在iPhone得app,它只能访问自己根目录下得一些文件(所谓sandbox).一个app发布到iPhone上后,它得目录结构如下: 1、其中得 app root 可以用 NSHomeDirectory() 访问到; 2、Documents 目录就是我们可以用来写入并保存文件得地方,一般可通过: NSArra转载 2011-11-29 18:52:49 · 1427 阅读 · 0 评论 -
iPhone开发学习笔记_剪切板的使用
上代码! 关键代码: UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; [pasteboard setString:@"南方基地"];原创 2011-11-29 18:34:31 · 1030 阅读 · 0 评论 -
获取IOS App版本
不解释,直接上代码 NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; NSString *name = [infoDictionary objectForKey:@"CFBundleDisplayName"]; NSString *version = [infoDi原创 2011-11-29 15:42:49 · 3720 阅读 · 1 评论 -
[转]textField键盘显示问题
http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TextandWeb/TextandWeb.html Listing 5-1 Handling the keyboard notifications // Call t转载 2011-11-26 10:24:23 · 731 阅读 · 0 评论 -
XCode中修改缺省公司名称/开发人员名称
1. XCode新建文件后,头部会有开发人员名称,公司名称等信息 // Created by Richard Clarke on 11-6-7. // Copyright Surna Hongkong Limited 2011. All rights reserved. 要修改这两个名称可通过在terminal中运行以下命令: default转载 2011-11-26 10:55:37 · 2074 阅读 · 2 评论 -
IOS中关于UIButton release的问题
今天在调试中发现不断出现内存泄漏,后来调试后发现原来是因为UIButton在delloc的时候release了.. 因为UIButton在创建的时候是使用ButtonWithType的方法,而不是alloc或者create,只有在使用alloc与create关键字的方法原创 2011-09-03 14:24:54 · 1152 阅读 · 0 评论 -
IOS_ImagePicker还有ActionSheet
这个是基于IOS5.0的ImagePicker,所以都没有release,大家适当加上去吧~ 先上效果图: 小牺牲一下我小侄吧... #import @interface DemoViewController : UIViewController @property (weak, nonatomic) IBOutlet UI原创 2012-04-10 23:39:10 · 1693 阅读 · 0 评论