uitableview

UITableViewCell ImageView not scaling properly?

喜夏-厌秋 提交于 2020-01-15 15:30:39
问题 I am populating a UITableView with images selected by the user. I'd like to the have thumbnails in the table cells all be the same size without affecting the aspect ratio so as not to stretch/skew the images, which sounds to me like ScaleAspectFill , however none of the UIViewContentMode selections seem to have an effect. There me conflicting methods, notable heightForRowAtIndexPath , but removing this makes my cells too small. The following are my didSelectRowAtIndexPath and

UITableView doesn't populate when waiting for CLLocationManagerDelegate 's didUpdateToLocation method on iPhone SDK

房东的猫 提交于 2020-01-15 14:09:25
问题 I'm trying to populate a UITableview with an array of cells. I usually do this from the viewDidLoad method but this time I want to populate the array based on location. Below is the first line of my interface: @interface RootViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource, CLLocationManagerDelegate> { In the implementation file the viewDidLoad method looks like this: - (void)viewDidLoad { // for location self.locationManager = [[CLLocationManager alloc] init

Round corners of UITableViewController

扶醉桌前 提交于 2020-01-15 12:29:27
问题 I am trying to round the corners of a UITableViewController or even the entire UINavigationController using the following code: self.view.layer.cornerRadius = 8.0f; The problem though is that when the view is rounded off, the UINavigationBar has a translucent, frosty background showing outside the rounded edges. I want to keep the navigation bar translucent, but I want the entire view to be rounded. With the code above, I get the following result: How can I produce this result without the

iOS - UITableView inside a UIView

筅森魡賤 提交于 2020-01-15 12:28:12
问题 I want to display a UITableView inside a UIViewController . This View Controller contains a UISegmentedControl with two screens ( FirstViewController and SecondViewController ). The first View Controller is the one that contains the UIViewTable (please don't mind the second). When I execute the app in the simulator, everything works fine, but when I try to scroll the table view in the first ViewController, the cells disappear . The only way to make them reappear is to kill the app and reopen

How to reload tableViewCell only in swift?

独自空忆成欢 提交于 2020-01-15 12:13:11
问题 Is there any way that I could reload only tableViewCell only but don't make it reload tableView section title View ? when I switched UITableViewCell I want to update data reload change override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { switch self[selectedIndex] { case .tracks: let cell = tableView.dequeueReusableCell(withIdentifier: cellId, for: indexPath) as! TracksCell return cell case .playlists: let cell = tableView

Broken cell with an odd strikethrough?

╄→尐↘猪︶ㄣ 提交于 2020-01-15 11:25:09
问题 I'm having a weird issue with a particular UITableView in my iPhone devel experience here. If you look at the following screenshot: alt text http://dl-client.getdropbox.com/u/57676/brokencell.png you'll notice a strike through going through the middle of the 'Jane Aba' cell. Any idea what might be causing this odd graphic display? It's true for both the simulator and for the actual device running 2.2 SDK. As requested, here's my -tableView:cellForRowIndexPath: method: * EDIT * I've located

With multiple UITableViews in a single UIScrollview, how to only load cell data for visible cells

自闭症网瘾萝莉.ら 提交于 2020-01-15 10:52:46
问题 I have 3 uitableviews in a single uiscrollview. Each uitableview is full length and not scrollable so that the outer uiscrollview scrolls them together. This works fine except the uitableviews believe all cells are visible so that all are created up front. Even this is acceptable except each call has an image view (a thumbnail) that is loaded asynchronously from a url. I am trying to figure out how to limit the image loading to only visible cells but still allow the user to scroll the outer

Apptentive Message cell color change

半腔热情 提交于 2020-01-15 10:15:31
问题 Hi I tried to customize apptentive ApptentiveMessageCenterReplyCell , ApptentiveMessageCenterContextMessageCell , ApptentiveMessageCenterMessageCell color since it is being used as cell in Storyboard. On color change i want to update its background color for that i could not access it from styleSheet using SDK. iOS SDK version: apptentive-ios 4.0.7 //Example code ApptentiveStyleSheet *style = [[Apptentive sharedConnection]styleSheet]; style.backgroundColor = self.isLightTheme ? [UIColor

Apptentive Message cell color change

泪湿孤枕 提交于 2020-01-15 10:12:10
问题 Hi I tried to customize apptentive ApptentiveMessageCenterReplyCell , ApptentiveMessageCenterContextMessageCell , ApptentiveMessageCenterMessageCell color since it is being used as cell in Storyboard. On color change i want to update its background color for that i could not access it from styleSheet using SDK. iOS SDK version: apptentive-ios 4.0.7 //Example code ApptentiveStyleSheet *style = [[Apptentive sharedConnection]styleSheet]; style.backgroundColor = self.isLightTheme ? [UIColor

Change default background color while deleting a row from tableView

China☆狼群 提交于 2020-01-15 09:19:29
问题 In my app, I changed the background color of every view to dark. But when I delete a row from tableView, row background changed to white. Why and how can I fix it? tableView.backgroundView?.backgroundColor = UIColor(red:0.1922, green:0.1922, blue:0.1922, alpha:1.0) view.backgroundColor = UIColor(red:0.1922, green:0.1922, blue:0.1922, alpha:1.0) if dataManagement.taskData.count != 0{ for rowIndex in 0...tableView.numberOfRows(inSection: 0) - 1 { let cellPath = IndexPath(row: rowIndex, section: