• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UITableViewCell row height changes on selection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UITableViewCell row height changes on selection?


  • Subject: UITableViewCell row height changes on selection?
  • From: Laurent Daudelin <email@hidden>
  • Date: Tue, 21 Jan 2014 00:57:05 -0500

I’m working on a straight tableview where I set the row’s height with:

self.tableView.rowHeight = SAVED_VALUE;

in viewWillAppear: of my custom tableview controller.

Everything works fine. However, when I tap a cell to select and it slides the detail into view, I can see as the cell is disappearing that the cell’s custom image view that is based on content view height changes, it defaults back to 44 points. I have searched everywhere but I can’t find why this would happen. I tracked the change in layoutSubviews. Sometimes, the height of the contentView is set to 44, sometimes it’s set to my saved value. There is only one place in the tableview controller where the height is set and it doesn’t change.

Anybody knows what could cause this? The row height is restored when the user navigates back from the detail view but it creates an unpleasant flicker as all the rows are restored properly. I did notice that the separator for the rows stays where it should.

My imageView frame is set in layoutSubviews and basically set like:

myImageView.frame = CGRectMake( 5.0f, 5.0f, self.contentView.frame.size.height - 10.0f, self.contentView.frame.size.height - 10.0f);

I want the view to be rectangular since the images may vary.

Thanks in advance for any pointer or help!

-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 				http://www.nemesys-soft.com/
Logiciels Nemesys Software					email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: Core Data : Opt Out of SQLite WAL is nullified after File > Duplicate ?
  • Next by Date: IOBluetoothDeviceSelectorController and NSImage compositeToPoint
  • Previous by thread: Re: Crisp text on NSTextView with setDrawsBackground:NO
  • Next by thread: IOBluetoothDeviceSelectorController and NSImage compositeToPoint
  • Index(es):
    • Date
    • Thread