w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
UITableView "dequeueReusableCellWithIdentifier" cause the cell overlap for dynamic cell height based on cell content?

The issue is that when you get a cell using dequeueReusableCellWithIdentifier it will not call your initializer initMessagingCellWithReuseIdentifier. Rename initMessagingCellWithReuseIdentifier to initWithStyle:reuseIdentifier: and it should work.

Notice that initWithStyle:reuseIdentifier: is the designated initializer (Doc: https://developer.apple.com/library/ios/documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html) and you should call [super initWithStyle:style reuseIdentifier:reuseIdentifier];. After that, implement the logic you are now implementing in initMessagingCellWithReuseIdentifier.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.