2010-11-02 21 views
-1
創建一個自定義活動指示燈

我需要知道如何創建在Xcode定製活動的指標,我厭倦了在網站上搜索的,我沒找到it.Please幫助meee什麼...如何在Xcode

+0

可能http://stackoverflow.com/questions/812832/create-custom-activity-副本iphone-sdk – KingofBliss 2010-11-26 16:21:56

+0

你也可以查看這個[鏈接](http://blog.blackwhale.at/?p=336)的自定義活動指標。 – Swapna 2010-11-02 10:20:18

回答

-3

你叫什麼叫定製活動指標?它可能只是一個圖標...

+0

一個活動指標是一個用戶對象 - UIActivityIndi​​catorView - http://developer.apple.com/library/ios/#documentation/uikit/reference/UIActivityIndi​​catorView_Class/Reference/UIActivityIndi​​catorView.html – 2010-11-02 10:17:07

+0

我知道......但Chinju談論自定義指標... – 2010-11-02 10:21:51

+0

感謝Benoit for your ur rply ... – Chinju 2010-11-12 12:10:57

12

活動指標只是一個圖像視圖與圖像序列動畫。爲了使自己的化妝還是你的活動指標動畫的每一幀的圖片,並使用這樣的代碼:

UIImageView *customActivityIndicator = [[UIImageView alloc] initWithFrame:CGRectMake(...)]; 

customActivityIndicator.animationImages = [NSArray arrayWithObjects:[UIImage imageNamed:@"frame1.png"],[UIImage imageNamed:@"frame2.png"],[etc...],[etc...],nil]; 
customActivityIndicator.animationDuration = 1.0; // in seconds 
customActivityIndicator.animationRepeatCount = 0; // sets to loop 

[customActivityIndicator startAnimating]; // starts animating 
[customActivityIndicator stopAnimating]; //stops animating 
+0

感謝您的rply Thomas clayson – Chinju 2010-11-12 12:11:39

+0

太棒了! Thanx Thomas – 2012-02-21 05:52:33