This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
如果后来开启的 develop and product push服务 | |
那么需要重新生成一下Provisioning Profiles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.在Keychain Access中选择证书和private key | |
2.导出p12文件 输入导出密码 | |
3.在目标机器双击导入 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://stackoverflow.com/questions/3868514/is-there-a-way-to-instantiate-a-nsmanagedobject-without-inserting-it | |
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Transaction" inManagedObjectContext:self.managedObjectContext]; | |
transaction = (Transaction *)[[NSManagedObject alloc] initWithEntity:entity insertIntoManagedObjectContext:nil]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As you already got your answer, for users of Xcode 4.2 (Snow leopard) Dinesh's solution won't work. Here you can right-click on the info.plist file, and open as source code. | |
Look for this, and replace <false/> with <true/> under <key>UIPrerenderedIcon</key> | |
<dict> | |
<key>CFBundlePrimaryIcon</key> | |
<dict> | |
<key>CFBundleIconFiles</key> | |
<array> | |
<string>iconNormal.png</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewWillDisappear:(BOOL)animated | |
{ | |
if ([self.navigationController.viewControllers indexOfObject:self]== NSNotFound) { | |
// back button was pressed. We know this is true because self is no longer | |
// in the navigation stack. | |
[self setEditMode]; | |
} | |
[super viewWillDisappear:animated]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stcui.me/202-ios-%E9%A6%96%E5%B1%8F%E7%9A%84%E5%9B%BE%E6%A0%87%E5%9C%86%E8%A7%92%E7%A9%B6%E7%AB%9F%E6%98%AF%E5%A4%9A%E5%B0%91/ | |
在图标的设计中会在ps上画出一个Demo来查看最终的效果,这里就需要自己绘制一个圆角的蒙板或者用其它方法来完成这一效果,这个圆角的半径究竟是多少呢? | |
在早期的iPhone/iPod中图标尺寸为57×57圆角半径为10px | |
之后的版本中的图标尺寸就是按照这个比例来缩放的 | |
如果是114×114的图标圆角半径为 114*(10/57) = 20 | |
其它的一些例子: | |
Icon512.png – 512px – 89.8245614035098 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
由于现在大部分SDK,第三方组件都是 ios5之前发布的, 所以都不会用到ARC | |
但是如果我想使用苹果新的特性ARC的话,难道要手动改那些组件,sdk? | |
no, 其实有个超简单的方法, | |
xcode 中 点选你的项目 ---> Bulid Phases ---> Compile Source | |
然后选择 那些没有使用ARC的 sdk 或者 组件 的.m文件, | |
加上 -fno-objc-arc 这个flag | |
这样这个文件在编译的时候就不会使用ARC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The way I solved this problem is to adjust the contentOffset according to the contentInset in the //UITableViewControllerDelegate (extends UIScrollViewDelegate) like this: | |
- (void)scrollViewDidScroll:(UIScrollView *)scrollView { | |
CGFloat sectionHeaderHeight = 40; | |
if (scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) { | |
scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0); | |
} else if (scrollView.contentOffset.y>=sectionHeaderHeight) { | |
scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////////////////////////////////////////////////////////////////////////// | |
#pragma mark - right section index | |
///////////////////////////////////////////////////////////////////////////// | |
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView | |
{ | |
NSArray *newarr=[[contacts_list_fix allKeys] sortedArrayUsingFunction:SortIndex context:NULL]; | |
return newarr; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
textView.keyboardtype = UIKeyboardTypeNumberPad; | |
typedef enum { | |
UIKeyboardTypeDefault, // 默认键盘:支持所有字符 | |
UIKeyboardTypeASCIICapable, // 支持ASCII的默认键盘 | |
UIKeyboardTypeNumbersAndPunctuation, // 标准电话键盘,支持+*#等符号 | |
UIKeyboardTypeURL, // URL键盘,有.com按钮;只支持URL字符 | |
UIKeyboardTypeNumberPad, //数字键盘 | |
UIKeyboardTypePhonePad, // 电话键盘 | |
UIKeyboardTypeNamePhonePad, // 电话键盘,也支持输入人名字 | |
UIKeyboardTypeEmailAddress, // 用于输入电子邮件地址的键盘 |