Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)viewDidLoad
- {
- self.tableView.allowsMultipleSelectionDuringEditing = YES;
- self.tableView.delegate = self;
- self.tableView.dataSource = self;
- self.tableView.alpha = 0.0f;
- [self.tableView registerNib:[UINib nibWithNibName:@"VirtualFileTableViewCell" bundle:[NSBundle mainBundle]]
- forCellReuseIdentifier:VirtualFileTableViewCellReuseID];
- }
- - (void)viewDidAppear:(BOOL)animated
- {
- [super viewDidAppear:animated];
- self.tableView.contentInset = UIEdgeInsetsMake([self.topLayoutGuide length], 0.0f, [self.bottomLaoyout guide length], 0.0f);
- self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake([self.topLayoutGuide length], 0.0f, [self.bottomLaoyout guide length], 0.0f);
- [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionBottom animated:NO];
- [UIView animateWithDuration:0.5f animations:^{
- self.tableView.alpha = ( self.viewType == ViewTypeList ? 1.0f : 0.0f );
- } completion:^(BOOL finished) {}];
- }
- - (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString * CellIdentifier = VirtualFileTableViewCellReuseID;
- VirtualFileTableViewCell * cell = (VirtualFileTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
- cell.sizeLabel.text = @"5 KB";
- return cell;
- }
- self.tableView.contentInset = UIEdgeInsetsMake([self.topLayoutGuide length], 0.0f, [self.bottomLaoyout guide length], 0.0f);
- self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake([self.topLayoutGuide length], 0.0f, [self.bottomLaoyout guide length], 0.0f);
- - (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString * CellIdentifier = VirtualFileTableViewCellReuseID;
- if(virtualFileTableViewCellObj == nil)
- {
- virtualFileTableViewCellObj= (VirtualFileTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
- }
- virtualFileTableViewCellObj.sizeLabel.text = @"5 KB";
- return virtualFileTableViewCellObj;
- }
- self.tableView.delegate = self;
- self.tableView.dataSource = self;
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString *CellIdentifier = @"albumListCell";
- VirtualFileTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil)
- {
- cell = (VirtualFileTableViewCell *) [[[NSBundle mainBundle] loadNibNamed:@"VirtualFileTableViewCell" owner:self options:nil] lastObject];
- }
- return cell;
- }
- static NSString *CellIdentifier = @"albumListCell";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement