私は以前に見たことのないテーブルセルに奇妙な問題がありました。私はテーブルをスクロールすると、お互いに出血しています。たとえば、今、私は、最初のセクションに "デバイス"というセルがあり、2番目のセクションには "Hi"と書かれ、3番目のセクションには空白セルがいくつかあります。スクロールすると、「デバイス」が「ハイ」の上に表示されることがあります(両方のラベルが表示されていて、オーバーレイしています(背景色がはっきりしています)。間違っているのかを把握しようとしているが、何も動いていないようにみえテーブルセルが互いにブリードアウト
をここに私のテーブルビューコントローラの関連セクションされています。。
- (id)initWithDeviceCoordinator:(DeviceCoordinator*)dev_con
{
self = [super initWithStyle:UITableViewStyleGrouped];
if (self) {
device_coordinator = dev_con;
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 4;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
if (section == 0 || section == 3) return 1;
else if (section == 1) return 8;
else if (section == 2) return 2;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
if (indexPath.section == 0) cell.textLabel.text = [device_coordinator getDeviceName];
else if (indexPath.section == 1)
{
if (indexPath.row == [[device_coordinator getChannelList] count])
{
cell.textLabel.text = @"Add new channel";
return cell;
}
cell.textLabel.text = @"HI";
return cell;
}
return cell;
}
クラスの他の機能のすべてが、XCodeのデフォルトです
問題、また解決策はありません。
は、この固定すべてのものに変更します。 – InsertWittyName