摘要: 运行时,就是运行时候的一些事儿。语言相关的运行时系统相当于 该语言的一种特殊的操作系统,所以我们应该了解 Objective-C runtime system 的基本原理 和 我们能够怎样去利用ObjC runtime system。Objc 中,消息直到运行的时候才和方法实现进行绑定的。但编译器会把一个消息表达式 转化为一个对消息函数 objc_msgSend 的调用:1. 编译阶段[receiver message];转化为:objc_msgSend(receiver, selector, arg1, argf2, …)2. 运行阶段 objc_msgSend 完成如下: First , 阅读全文
posted @ 2012-06-18 15:11 姜萌芽 阅读(483) 评论(0) 推荐(0) 编辑
摘要: If you have tried to send any information using a GET web request, you would have come cross an annoying problem, That annoying problem is making sure that the URL is corrently encoded. The issue is that by default most of these methods leave characters such as & = ? within a URL, as they are st 阅读全文
posted @ 2012-04-26 16:50 姜萌芽 阅读(7063) 评论(3) 推荐(1) 编辑
摘要: 1. Hide the existing system controls of the MPMobilePlayerController. MPMoviePlayerController * _videoPlayer; ... _videoPlayer.controlStyle = MPMovieControlStyleNone; ...2. Add your customized view with customized control buttoms (play, pause, stop, prev, next) or slider (volumn slider) to the _... 阅读全文
posted @ 2012-04-19 16:40 姜萌芽 阅读(540) 评论(0) 推荐(0) 编辑
摘要: TheCore Graphics API is an object oriented API. To allow developers to use that API in as many environments as possible, however, the system implements it as a set of C routines. The API itself draws upon the object-oriented concepts of encapsulation, inheritance, and polymorphism. Because C doesn&# 阅读全文
posted @ 2012-04-18 10:31 姜萌芽 阅读(320) 评论(0) 推荐(0) 编辑
摘要: self.navigationItemself.navigationController.navigationItemself.navigationController.navigationBar1, 不要混淆 self.navigationItem 和 self.navigationController.navigationItem ,UINavigationItem 本身是用来 定制 ViewController 自己在被导航过程中的 appearence , navigationItem 是 UIViewController 类 关于UINavigationControllerItem 阅读全文
posted @ 2012-04-15 18:42 姜萌芽 阅读(553) 评论(0) 推荐(0) 编辑
摘要: In windows 7 Snipping Tool is a wonderful tool to take a screen shot. However in MaxOS X , you need find another way.below , i will tell you how to take a screen shot in Max OS X:I Must agree with myself on this that switching to Max OS X wasn't the easiest thing to do , i had to learn around ne 阅读全文
posted @ 2012-04-13 16:51 姜萌芽 阅读(295) 评论(0) 推荐(0) 编辑
摘要: Apple 对iPhone应用程序中的png图片进行了特殊的处理,在png文件头之后加了一个非标准的CgBI数据段,IDAT段图像数据也没有传统的压缩数据头和尾,并且红色和蓝色是反的,这样就无法在Mac或Windows下不能正常使用了。洋人已经搞定了,先下载这个程序:http://acquisition.dreamhosters.com/iPhonePNG.zip解压后将 iPhonePNG 这个二进制文件复制到 /Applications 目录假设你的图片在./img目录下,想转换到 ./decode 目录,在终端执行:$ find ./img -name "*.png" 阅读全文
posted @ 2012-04-13 10:05 姜萌芽 阅读(329) 评论(0) 推荐(0) 编辑
摘要: If your application runs in landscape mode only, however, you must perform the following steps to make it launch in a landscape orientation initially.In your application’s Info.plist file, add the UIInterfaceOrientation key and set its value to the landscape mode. For landscape orientations, you can 阅读全文
posted @ 2012-04-08 16:48 姜萌芽 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 直接log :- (void)viewDidLoad{ [superviewDidLoad]; UIView * whiteView = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 90, 90)]; whiteView.backgroundColor = [UIColorwhiteColor]; UILabel * label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 70, 20)]; label.text = @"kkjkjkkjkjkjkjjkjkjkjjkjkkj 阅读全文
posted @ 2012-04-05 11:42 姜萌芽 阅读(360) 评论(0) 推荐(0) 编辑
摘要: UIKit 框架属于高层框架,除此之外,另两个低层框架是经常用到的: Core Graphics And image I/O .通过Core Graphics我们可以创建和应用image masks,从一个存在的iamges中创建一部分对象,应用一个色彩空间,可以通过每一个字节,每一个像素的访问images,并渲染。image I/O 框架和Core Graphics紧密相关。它允许应用程序去读取和写入各种image文件格式。它可以快速的编码和解码image,iamge metadata和image caching。UIImageView is a method to display an I 阅读全文
posted @ 2012-04-01 15:29 姜萌芽 阅读(226) 评论(0) 推荐(0) 编辑