上一章我已經(jīng)介紹了obj模型的加載和使用,本章節(jié)介紹進(jìn)度條的使用,由于進(jìn)度條是繼承ANTImageView這個(gè)類的,所有有ANTImageView所有的方法和屬性,例如:焦點(diǎn)拾取,圖片替換等等。
進(jìn)度條的加載如下:
ANTPrograssBar *progressBar = [[ANTPrograssBar alloc] initWithMode:ANTVR_PLANE];
[progressBar setupTextureWithImage:[UIImage imageNamed:@"progress.png"]];
[progressBar setObjectRect:32.0 Height:120.0 * 0.04];
[self.library addSubObject:progressBar];
這樣就往場景中添加了進(jìn)度條控件了。

Paste_Image.png
// 進(jìn)度條自帶的參數(shù)
// 比例
@property(nonatomic, assign)float ratio;
// 以X/Y/Z軸移動(dòng)。
@property(nonatomic, assign)AXIS dir;
- (void)setCurrentPos:(float)current_pos Dir:(AXIS)dir;
- (void)setCurrentPos:(float)current_pos Dir:(AXIS)dir; 這個(gè)方法能控制進(jìn)度條當(dāng)點(diǎn)的移動(dòng)位置。所以使用進(jìn)度條的話,若要實(shí)時(shí)更新進(jìn)度條當(dāng)前所處的位置,只需實(shí)時(shí)設(shè)置current_pos的值。
具體的使用詳細(xì),請(qǐng)看demo。