uitableview

Logic for adding images and scroll icon to the table view

末鹿安然 提交于 2020-01-25 11:25:05
问题 I have a table view, and I am adding four UIImageView s to a row, so in total I have five rows and twenty image views. I am inserting images one by one into the cell. The second row will only start to fill once all four image views are filled. I need some logic for this. I mean, how can I check which place is next to be filled in the table view and at which event? How can I add images one by one to the UIImageView s? Also, initially only two rows will be shown. After filling these two rows,

Problem with row insertion in a UITableView

青春壹個敷衍的年華 提交于 2020-01-25 07:58:06
问题 I've got a UIView with a UITableView that lists chats. When clicking on a specific conversation, I'm segueing modally to another UIView that again holds a UITableView that lists the individual messages of that chat - i.e. the chat details. The ChatDetailViewController looks like this: class ChatDetailViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { @IBOutlet weak var UserLogo: UIImageView! @IBOutlet weak var UserName: UILabel! @IBOutlet weak var MessageList:

Crash on download asynchronous images in iphone dev

北战南征 提交于 2020-01-25 07:09:08
问题 I am using this link for downloading asynchronously images and display them onto my table view and at the same time i use same asynchronous class onto my next view but when dealloc is called of last time used asynchronous class then my application is crash. Someone please help me on that, thanks in advance. 回答1: You sent a method to a released object. You can find it out by yourself. Please turn on malloc stack and zombie for your scheme in XCode: Product -> Edit Scheme -> Diagnostics check

swift tableview how to select all rows

人走茶凉 提交于 2020-01-25 05:16:10
问题 I have Button in tableview I want when I press that button will select all cell rows, how to do that? I tried alot but I got nothing I'm so confused how to make the button contact the cell I've tried to make var like this var x = false then I do like if( x == true ) { //Code } and when you press the button it will be true but I don't know in which func I should put this ? and I don't know how to select all rows Could someone help me how to Select \ Deselect all rows in cell when pressing

UIActivityIndicator scrolls with tableView

被刻印的时光 ゝ 提交于 2020-01-25 04:28:07
问题 I have a table view controller .When I start activity indicator to animate and then scroll the table view , activity indicator starts to scroll with that . I have tried to set a specific location for activity indicator and also add it as subview of vew .This is the codes that I have written for that : spinner.frame.origin.x = self.view.frame.size.width / 2 - (spinner.frame.size.width / 2) spinner.frame.origin.y = self.view.frame.size.height - (self.tableView.rowHeight / 2 ) spinner

UINavigationController back button action problem

孤人 提交于 2020-01-25 03:18:05
问题 I have an UINavigationController and the first view is an UIView. I've setup two buttons and each one pushes another view , both UITableViewControllers. The first buttons works just fine. The problem is: when I'm in the second TableViewController and I tap on the back button it tries to push the view again and only the second time it goes back to the Main View. I also have an UITabBarController setup and I noticed that if I am in my first tab(the Main View with the two buttons pushing the two

UIRefreshControl flicker

佐手、 提交于 2020-01-25 00:41:06
问题 I'm experiencing a kind of flicker with my implementation of UIRefreshControl under iOS 8. Every first time I come to the top of my tableView (meaning when the app has just started) I see the flicker shown in the gif below. This does not happen on any subsequent times I come to the top of the tableView until this view is loaded again, so after I did something in another view of the app or restart it altogether. This is the code in the viewDidLoad() of my application: let refreshControl =

How might I create one UITableView with two data sources

泄露秘密 提交于 2020-01-25 00:12:26
问题 I have a UIViewController with one UITableView. But that tableView has two data sources. Basically a UIButton would decide which data source is active. How might I do that? there is no such method as [self.tableView reloadData:myDataSourceArray]; Which would help a great deal towards discriminating which data source to use and which UITableViewCell extension to use. So how might I go about this? I say button to keep it simple, but in reality, dataSource_1 is preloaded from server while

UITextField placeholder text overlay issue

倾然丶 夕夏残阳落幕 提交于 2020-01-24 22:59:09
问题 I have a table view with three table view cells. During cell configuration, I add a UITextField to each of the cells and I also set the placeholder value on all of the text fields. When the table view loads the end results looks like this: The issue I'm having, is that when I scroll any of the cells "off the screen" when they reappear the placeholder text get darker and darker, like here: When I then attempt to change the UITextField string value by typing a name in, or by programatically

iOS swift search bar

蹲街弑〆低调 提交于 2020-01-24 21:32:05
问题 I am a beginner in Swift. I am currently implementing a search bar that can searched by multiple fields. From my knowledge, I know that we need an array for iOS swift search bar. Below are the codes that I am having currently. I have no idea why my search has no result and I have already confirmed that I have data in my array. updateSearchResultsForSearchController. func updateSearchResultsForSearchController(searchController: UISearchController) { filtered.removeAll(keepCapacity: false) for