好链接:
你的第一个 iOS 应用程序: 100% 的编程方式
http://www.oschina.net/translate/your-first-ios-app-100-programmatically?print
iOS 7 Xcode 5 最初级小教程, 人生中第一个App诞生了.:
http://www.macx.cn/thread-2104805-1-1.html
eseedo:《让不懂编程的人爱上iPhone开发》系列教程1-iOS7版:
http://www.cocoachina.com/applenews/devnews/2013/0916/7001.html
我后来在网上收集到了更完整的教程以及源码。(感谢essedo和万能的互联网。)
下载地址:http://pan.baidu.com/s/1kTLVeYz
xcode创建第一个类:
http://blog.csdn.net/ewrfedf/article/details/8507927
Creating Hello World App Using Xcode 5 and Interface Builder
http://www.appcoda.com/hello-world-app-using-xcode-5-xib/
http://blog.csdn.net/richard_wu2005/article/details/6654084
苹果向开发者推出中文版iOS应用开发入门指南
https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOSCh/chapters/Introduction.html
你的第一个 iOS 应用程序: 100% 的编程方式
command+鼠标左键点击函数名,可以找到这个函数在哪里被调用。
1.cd ~/Library/Developer/Xcode/DerivedData
2.rm -fr * //注释:-fr和*是分开的
3.关闭模拟器,关闭Xcode,重新启动Xcode
重新启动后我新建一个项目,运行,OK啦。
不知道对你的有没有用,你可以试一下。我觉得这个Xcode的一个bug。碰到好多次了,真心无语
ios UICollectionView的使用
http://moto0421.iteye.com/blog/1586791
iOS 之美:iOS Delegate 使用五步曲
http://leopard168.blog.163.com/blog/static/168471844201307112149221/如果不是类的public属性,用property写在.m文件里(这个属性可能是protected,或者private的)
case 1: protected(只有子类和本身可以访问)
case 2: private(不能随随便便访问)
在这两种情况下,类外的类想访问的话,就要进行特殊的操作。(比如使用getter或者setter)
我觉得这个帖子写得比较容易懂,适合初学者看。
http://blog.csdn.net/holydancer/article/details/7355833
它的意思好像是,使用property和sythesize可以比较方便地做出getter与setter(代码会比java短,因为java的getter和setter会比objective-c冗长)
理解2:
平时这么写即可:
@interface MyViewController :UIViewController
@property (nonatomic, retain) UIButton *myButton;
@end
不用写成
@interface MyViewController :UIViewController
{
UIButton *myButton;
}
@property (nonatomic, retain) UIButton *myButton;
@end
无视_myButton,干脆把它当self.myButton好了
//
#pragma mark iOS 6 landscape
//
//允许屏幕自动旋转
- (BOOL)shouldAutorotate {
return YES;
}
//在允许屏幕自动旋转的情况下,只支持屏幕朝左或者朝右就是强制横屏。
- (NSUInteger)supportedInterfaceOrientations {
returnUIInterfaceOrientationMaskLandscapeRight;
//| UIInterfaceOrientationMaskLandscapeLeft;
}
ios design patterns详解Objective-C中变量和数据类型
%m.nf
m总的长度,n是小数的长度。
也可以%.2f
%.2f 这个用的比较多
Convert NSString to int
1 | NSString *aNumberString = @"123" ; |
2 | int i = [aNumberString intValue]; |
Convert int to NSString
1 | int aNumber = 123; |
2 | NSString *aString = [ NSString stringWithFormat: @"%d" , aNumber]; |
//拼接字符串
int aIntNumber = [indexPath row];
NSString *tail = [NSStringstringWithFormat:@"%d", aIntNumber];
NSLog (@"%@", tail);
NSString *head = @"cell";
NSString *result = [headstringByAppendingString:tail];
Objective-c之NSArray(NSMutableArray)
http://my.oschina.net/xiguaa/blog/146434
http://www.cnblogs.com/heyonggang/p/3513479.html
http://www.cocoachina.com/newbie/env/2011/1009/3334.html