Translate

顯示具有 iOS 標籤的文章。 顯示所有文章
顯示具有 iOS 標籤的文章。 顯示所有文章

2014年6月26日 星期四

Facebook Creat App Status for iOS

今天需要測試一下Feacbook的iOS SDK的Login功能
沒想到facebook又大改版所以一些步驟也都忘光光了
一開始都照著facebook文件一步一步去做
後來遇到怎樣都不行讓facebook的App激活起來
如圖
後來問一下朋友原來是在Status & Review這部分
Do you want to make this app and all its live features available to the general public
選項要為YES
如圖
修改為這樣

這樣App就正式搞定了

2013年5月14日 星期二

2013年5月8日 星期三

UIButton custom font vertical alignment

我在專案裡面用了客制化的字體
發現我的UIButton的字不在正中間


上網查到許多方法
參考link
參考link
參考link

最後我使用了最簡單的方法
yourButton.contentEdgeInsets = UIEdgeInsetsMake(5, 0, 0, 0);

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:

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

參考link

參考lin2


dispatch_async(dispatch_get_gloabal_queue(0, 0), ^{ //加入耗时操作 //...... dispatch_async(dispatch_get_main_queue(), ^{ //更新UI操作 //..... }); });

2012年5月29日 星期二

iOS參考網站

元件參考

Cocoa Controls
http://cocoacontrols.com/
相當好用的網站,很多高手在裡面分享自己的東西,但是有些東西還是會有問題。

中國Controls資源分享

UI 畫面參考
這網站本身的設計跟用色就已經很成功了

論壇
中國

台灣

Erica Sadun

Ray Wenderlich

2012年5月28日 星期一

這邊是我自己對開發IOS的紀錄

這邊是我自己對開發IOS的紀錄
沒什麼特別的
以利於自己回來找些文章比較快速
請大家多多指教