[iOS SDK] SSPieProgressView を使ってみた

[IOS] iOS オープンソースライブラリ徹底活用 菊田剛著 秀和システム | DevCafeJp で紹介されていた、SSPieProgressView for iOS – Cocoa Controls を使ってみたのでメモ。
デザインのよい円形のプログレスの表示をしてくれる。
自分の場合はカウントダウンタイマーのかわりとした。
2013/02/16時点での Class Reference はこちら。ARC をサポートしている。
SSPieProgressView Class Reference

Pieprogress1

使い方は簡単なので紹介するまでも無さそうだけれども参考までにコード片を貼ってみる。

SSPieProgressView *progressView6 = [[SSPieProgressViewalloc] initWithFrame:CGRectMake(170.0f, 95.0f, 130.0f, 130.0f)];
progressView6.progress = 0.66;
[self.viewaddSubview:progressView6];

_timer = [NSTimerscheduledTimerWithTimeInterval:0.05 target:self selector:@selector(decrementProgress:) userInfo:nil repeats:YES];

- (void)decrementProgress:(NSTimer *)timer {
     _progressView7.progress = _progressView7.progress - 0.01;
     if (_progressView7.progress == 0.0f) {
          _progressView7.progress = 1.0;
     }
}

Custom UI Controls for iOS and Mac OS X – Cocoa Controlsにはデザインのよい部品が多く登録されており、眺めているだけでも楽しい。

返信を残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

This site uses Akismet to reduce spam. Learn how your comment data is processed.