ADLivelyTableView kullanmak istiyorum ama iyi çalışmadı. ADLivelyTableView kullanamazsınız
https://github.com/applidium/ADLivelyTableView
İşte benim kodudur.◯ ViewController.h
#import "ADLivelyTableView.h"
@interface ViewController : GAITrackedViewController<UITableViewDelegate, UITableViewDataSource>
{
ADLivelyTableView * tableView;
}
@property (nonatomic, retain) ADLivelyTableView *tableView;
◯ ViewController.m
#import "ViewController.h"
#import "ADLivelyTableView.h"
@implementation ViewController
@synthesize tableView;
---- Sabit kod ----
- (void)viewDidLoad {
tableView = [[ADLivelyTableView alloc]initWithFrame:rect style:UITableViewStylePlain];
//[transitionButton release];
tableView.delegate = self;
tableView.dataSource = self;
tableView = (ADLivelyTableView *)self.tableView;
tableView.initialCellTransformBlock = ADLivelyTransformFan;
[tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
NSString *cellIdentifier = @"Cell";
UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (!cell){// yes
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
}
[uv addSubview:tableView];
[tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
//return self.feedManager.feedArray.count;
return [[APP_DELEGATE titlearray] count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *cellIdentifier = @"Cell";
UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (!cell){// yes
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
}
// Update Cell
[self updateCell:cell atIndexPath:indexPath];
return cell;
}
- (void)updateCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath
{
// Update Cells
cell.backgroundColor = [UIColor clearColor];
cell.textLabel.text = [[APP_DELEGATE titlearray] objectAtIndex:indexPath.row];
cell.textLabel.textColor = [UIColor blackColor];
cell.textLabel.font = [UIFont fontWithName:@"HiraKakuProN-W3" size:15];
cell.textLabel.adjustsFontSizeToFitWidth = YES;
cell.textLabel.minimumScaleFactor = 10.0f;
cell.textLabel.numberOfLines = 0;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle != UITableViewCellEditingStyleDelete) {
return;
}
[self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
[self.tableView reloadRowsAtIndexPaths:[self.tableView indexPathsForVisibleRows] withRowAnimation:UITableViewRowAnimationAutomatic];
}
ve hata arasında "ADLivelyTransform" blok işaretçi türü döküm (aka "NSTimerInt const void *, '' C işaretçi tipine)' Erçal (^) CALayer * __ güçlü, şamandıra) bu yüzden bu kodu açıklama ve başarılı inşa
if (block != _transformBlock) {
Block_release(transformBlock);
_transformBlock = Block_copy(block);
}
de neden olduğu bir köprü döküm" gerektirir.
Ancak tableView hücreleri animasyon vermedi.
Ne yapmalıyım?
Thanks.The hata görünmedi ama tableViewCell animasyon – bao
Sen tableview temsilci yöntemleri uygulamalıdır ..... işe yaramadı işe yaramadı ne demek istiyorsunuz? – gabbler
"tableView.delegate = self;" ve "" değil "tableview temsilci yöntemleri"? "Çalışmıyor" demek, soldan görünen tableviewcell animasyonu çalışmıyor. –
bao