//点击后,要跳到topicesVC里面去。 #import "RecordOfLearnVC.h" #import "TopicesVC.h" #import "RecordList.h" NSString* randomNum(int min,int off); @interface RecordOfLearnVC () { NSArray *nums; } @end @implementation RecordOfLearnVC - (void)viewDidLoad { [super viewDidLoad]; [self configNavigationBar]; [self setTitle:@"学车记录"]; // [self.view setBackgroundColor:[UIColor whiteColor]]; [self.view setBackgroundColor:backGroundColor]; self.navigationController.navigationBar.translucent = NO; nums = [NSArray array]; [self getTopicCount]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } #pragma mark - -(void)myInit { //搞几个简单的按钮吧。、 CGFloat x,y,w,h; NSInteger tag = 0; NSArray* titles = @[@"报名学员",@"科一学员",@"科二学员",@"科三学员",@"科四学员",@"下证学员"]; w = h = (kSize.height - 60 - kNavOffSet)/4.0; x = (kSize.width - w*2)/3.0; y = w*.4; UIImageView* iv; UILabel* label; UIButton* btn; NSArray* images = @[@"learnRec0.png",@"learnRec1.png",@"learnRec2.png", @"learnRec3.png",@"learnRec4.png",@"learnRec5.png"]; NSArray* colors = @[RGB_COLOR(251, 95, 69),defGreen, [UIColor purpleColor],[UIColor redColor], RGB_COLOR(35, 156, 255),RGB_COLOR(253, 167, 0)]; //如果请求不到数据 就先显示假数据 if (nums.count < 6) { nums = @[randomNum(10, 100),randomNum(40, 100), randomNum(20 , 20),randomNum(50, 50), randomNum(100 , 30),randomNum(50, 30)]; } for (int i =0; i