Translate
2016年3月23日 星期三
2015年8月7日 星期五
2014年6月26日 星期四
Facebook Creat App Status for iOS
2014年2月4日 星期二
2013年5月8日 星期三
2013年5月7日 星期二
ios-tips-custom-fonts
參考link
首先先把.ttf檔放進專案裡
確定有勾選Add to targets

Verify the font is in the project. There are two places you can do this.
By selecting the font, and verifying “Target Membership” in the Utilities area.

And By selecting your apps target, selecting the “Build Phases” tab, and verifying that your font is in the “Copy Bundle Resources” section.

And finally, add the font to your Info.plist. Note that most apps change the name of their plist to something like-Info.plist. Add a key of “Fonts provided by application”, and make sure it’s an array, then add your font file name as an item in the array. Make sure you use the exact file name, and that your file name has an all-lowercase extension (.TTF apparently doesn’t work on iPhones, but .ttf does).

Knowing your font
This is where I had some issues. When you add your font you use the file name, but when you use your font you use the font name… The EXACT font name. If you ctrl + click on the .ttf file and select “Get Info”, you can find the “Full Name”. That seems to work with a lot of fonts, but the font I’m using doesn’t work that way. I had to open the .ttf file in the Font Book application, and look at the window header.

Using this name, you can log what font names you have available by using the fontNamesForFamilyName method like so:
Using your font programmatically
Say you have a UILabel:
UILabel *myLabel = [[UILabel alloc] init];
[myLabel setText:@"Label Text"];
We set the font of our label by creating a UIFont, and setting it to our label with setFont.
首先先把.ttf檔放進專案裡
確定有勾選Add to targets

Verify the font is in the project. There are two places you can do this.
By selecting the font, and verifying “Target Membership” in the Utilities area.

And By selecting your apps target, selecting the “Build Phases” tab, and verifying that your font is in the “Copy Bundle Resources” section.

And finally, add the font to your Info.plist. Note that most apps change the name of their plist to something like

Knowing your font
This is where I had some issues. When you add your font you use the file name, but when you use your font you use the font name… The EXACT font name. If you ctrl + click on the .ttf file and select “Get Info”, you can find the “Full Name”. That seems to work with a lot of fonts, but the font I’m using doesn’t work that way. I had to open the .ttf file in the Font Book application, and look at the window header.

Using this name, you can log what font names you have available by using the fontNamesForFamilyName method like so:
NSLog(@"tt0001m_: %@",
[UIFont fontNamesForFamilyName:@"Swis721 Lt BT"]
);
Which gives the output:
2012-08-24 11:25:10.968 GenericKeychain[7260:c07] tt0001m_: (
"Swiss721BT-Light"
)
Using your font programmatically
Say you have a UILabel:
UILabel *myLabel = [[UILabel alloc] init];
[myLabel setText:@"Label Text"];
We set the font of our label by creating a UIFont, and setting it to our label with setFont.
UIFont *swissLight = [UIFont
fontWithName:@"Swiss721BT-Light"
size:myLabel.font.pointSize];
[myLabel setFont:swissLight];
2013年5月3日 星期五
GCD全称为Grand Central Dispatch dispatch_async
2012年5月29日 星期二
iOS參考網站
元件參考
Cocoa Controls
http://cocoacontrols.com/
Cocoa Controls
http://cocoacontrols.com/
相當好用的網站,很多高手在裡面分享自己的東西,但是有些東西還 是會有問題。
中國的Controls資源分享
UI 畫面參考
這網站本身的設計跟用色就已經很成功了
論壇
中國
台灣
Erica Sadun
Ray Wenderlich
2012年5月28日 星期一
訂閱:
文章 (Atom)



