提交
This commit is contained in:
@@ -157,6 +157,19 @@
|
||||
[self setPirce];
|
||||
[self.collectionView reloadData];
|
||||
});
|
||||
_openBtn.enabled = YES;
|
||||
if (![self.cruuent_nobility_id isExist]) {
|
||||
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn_nor"] forState:(UIControlStateNormal)];
|
||||
return;
|
||||
}
|
||||
if (self.currentIndex<index) {
|
||||
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn_update"] forState:(UIControlStateNormal)];
|
||||
return;
|
||||
}else if (self.currentIndex==index){
|
||||
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn_renew"] forState:(UIControlStateNormal)];
|
||||
}else{
|
||||
_openBtn.enabled = NO;
|
||||
}
|
||||
}
|
||||
- (void)cycleScrollView:(GKCycleScrollView *)cycleScrollView didSelectCellAtIndex:(NSInteger)index {
|
||||
|
||||
@@ -226,7 +239,8 @@
|
||||
-(UIButton *)openBtn{
|
||||
if (!_openBtn) {
|
||||
_openBtn = [[UIButton alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-16-128, 19, 128, 41)];
|
||||
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn"] forState:(UIControlStateNormal)];
|
||||
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn_nor"] forState:(UIControlStateNormal)];
|
||||
[_openBtn setBackgroundImage:[UIImage imageNamed:@"nobility_detail_open_btn_disable"] forState:(UIControlStateDisabled)];
|
||||
[_openBtn addTarget:self action:@selector(openAction) forControlEvents:(UIControlEventTouchUpInside)];;
|
||||
}
|
||||
return _openBtn;
|
||||
|
||||
Reference in New Issue
Block a user