- 浏览: 340277 次
- 性别:
- 来自: 武汉
最新评论
-
leslie89757:
[img][img][img][img][img][img][ ...
CocoaPods 安装使用 -
hanmeizhi:
very useful to me. Thanks
Dismissing MPMoviePlayerViewController the right way -
luzj:
这个考虑不周全, 在iOS5的键盘高度就不是这个值了,这样写死 ...
UITextView: move view when keyboard appears -
xjg19870111:
不错。
objective-c NSString 常用操作 -
juedui0769:
现在已经不行了!
android源码下载
文章列表
1. NSOperationQueue and NSOperation, do I have to release it?
You have to release your copy that you created.
I assume that you are doing something like:
SomeOperation is subclass of NSOperation which does something.
- (void)start
{
SomeOperation *so = [[SomeOperation alloc] initWithURL:url];
...
//string1 将被自动释放
NSString* string1 = [NSString string];
//必须在用完后手工释放
NSString* string2 = [[NSString alloc] init]; [string2 release];
Typically, each class gets two files: a header file that contains the @interface for the class and a dot-m file that holds the @implementation.
类的接口(interface)通常存 ...
The following line does the job if url is a NSString:
NSString *filename = [url lastPathComponent];
If url is a NSURL, then the following does the job:
NSString *filename = [[url path] lastPathComponent];
To pass parameter to an NSTimer, the parameter should be specified in the field userInfo of the timer. We can pass any number of parameters to NSTimer provided they are wrapped into a collection. Here i am passing two strings to the timer method by wrapping them into an NSMutableDictionary.
NSMutabl ...
---转载文章。。备忘。。
ASIHTTPRequest是个很易用的iOS / Mac OS X平台的HTTP库,比NSURLRequest好用多了,所以我一直在用它。
不过使用中我发现,当下载线程数超过2时,就会影响到主线程响应用户请求的速度了。好奇之余我测试了一下completionBlock,发现它总是在主线程调用,而NSOperation的文档中却说一般会在子线程中执行。
于是看了下ASIHTTPRequest.m,终于发现问题所在了:
// Subclasses might override this method to process the result in the sam ...
start open xcode and create a new project, chose the template as “Navigation Based” and name it as “CustomCellTestProject”. What template you chose does not matter, refer my previous posts to find how you can start working on any template.
First thing we will do is create a customCell. Right click on ...
http://tapfancy.com/
http://creattica.com/mobile/latest-designs/
http://dribbble.com/tags/iphone
http://www.iospirations.com/
http://iphone.appstorm.net/roundups/design/40-more-pixel-perfect-iphone-app-interfaces/
iphone human interface
http://developer.apple.com/library/ios/#documentation/User ...
1. application executable is missing a required architecture armv6
In the Xcode 4.2 GM this is still a problem but you can resolve it by doing the following.
Switch to the files/folders view in xcode project
Select your Project ( the blue icon)
Select your Application under Targets in the middle o ...
If you have used the MPMoviePlayerViewController to play videos in iOS, chances are you have gotten a little frustrated by its rigidness. A couple of issues I personally encountered were:
When presented modally, the view controller did not respect the modal transition style I had chosen for it.
When ...
http://brian-erickson.com/uiimage-thumbnails-in-objective-c-for-the-iph
+ (UIImage *)generatePhotoThumbnail:(UIImage *)image {
// Create a thumbnail version of the image for the event object.
CGSize size = image.size;
CGSize croppedSize;
CGFloat ratio = 64.0;
CGFloat offsetX = 0.0;
CGFlo ...
http://www.raywenderlich.com/1948/how-integrate-itunes-file-sharing-with-your-ios-app
1. MBProgressHUD(进展指示符库)
地址:https://github.com/jdg/MBProgressHUD
苹果的应用程序一般都会用一种优雅的,半透明的进度显示效果,不过这个API是不公开的,因此你要是用了,很可能被清除出AppStore。而 MBProgressHUD提供了一个替代方案,而且在用户角度上,实现的效果根本看不出和官方程序有什么差别。同时还提供了其他附加功能,比如虚拟进展 指示符,以及完成提示信息。整合到项目里也很容易,这里不细谈了。
2. ASIHttpRequest(HTTP Network库)
地址:http://allseeing-i.com/ASI ...
cocoachina上的推广整理帖:
http://www.cocoachina.com/bbs/read.php?tid=14000
How do I find my iTunes App Store URL?
The easiest way to find your App Store URL is by opening iTunes and copying the information directly from the App Store. The steps included below outline how you can find your App URL.
Open iTunes.
Search for your app.
Click your app's name and copy the URL (r ...
Pretty much what Marc and Chris said, though I prefer to change the value when the app quits in case there're multiple areas of the application that need to know about it. In code:
// -applicationDidFinishLaunching:
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWith ...