还没做完,时钟部分做了一点,用的开源的时钟。
先截图可能效果:
采用的是标签栏加导航栏的方式。
关键的就那么几行代码。
NSString *cellIdentifer = @"cell1"; //[tableView registerClass:
[UITableViewCell class] forCellReuseIdentifier:cellIdentifer];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer];
//NSString *str =[[NSDate date] description];
NSDate *date = [NSDate date];
NSCalendar *cal = [NSCalendar currentCalendar];
NSDateComponents *components = [cal components:NSHourCalendarUnit fromDate:date];
NSString *strHour = [NSString stringWithFormat:@"%ld", (long)[components hour]];
NSString *strMinute = [NSString stringWithFormat:@"%ld", (long)[components minute]];
myhour = [strHour intValue]; myminute = [strMinute intValue];
UIView *clockView = (UIView *)[cell viewWithTag:100];
CGRect clockFrame = CGRectMake(0,0,CGRectGetWidth(self.view.bounds)*0.25,CGRectGetHeight(self.view.bounds)*0.25);
self.clock = [[ALDClock alloc] initWithFrame:clockFrame]; // Put the clock in the centre of the frame self.clock.center = clockView.superview.center; [clockView addSubview:self.clock]; [self applyClockCustomisations]; // Uncomment the following line to preserve selection between presentations. cell.accessoryType = UITableViewCellAccessoryNone;
我还想做个新闻客户端,一个音乐播放器,一个计算器。
最近做的一个图片浏览器做的不是很好看,下次改进分享。