uitableview

Display alert message if button is pressed when no tableView cells selected

血红的双手。 提交于 2020-01-16 14:54:46
问题 I have a tableView that has multiple selections enabled for the cells. The TableViewController also contains a navigation bar with a BarButtonItem. When this button is selected another UITableViewController is opened. I would like to add a parameter where if no selections are made to the UITableView than the nextButton will trigger an alert message saying that the user must select a row or more. How can something like this be done? Currently, in the didSelectRowAt method, I have a checkmark

How to resize the row height of a UITableView automatically in xamarin ios

a 夏天 提交于 2020-01-16 14:44:29
问题 I am new in xamarin.ios I want to resize the row height according to the content length. How can I do that. Here is my ViewController.Cs public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); nfloat _width = UIScreen.MainScreen.Bounds.Width / 3; DataBinding(); _table = new UITableView(new CGRect(0, 0, View.Frame.Width, View.Frame.Height)); _table.Source = new DetailsTableViewSource(_caseDesign); _table.RowHeight = UITableView.AutomaticDimension; _table

UIButton state changing while scrolling the tableview with multiple sections - Swift

萝らか妹 提交于 2020-01-16 13:17:21
问题 I have multiple sections in my tableview with multiple custom cells(cell with radio button, cell with check box and cell with textfield). Problem is under section with radio button, only one radio button should be selectable under radio button section. After selecting, I have tried scrolling, multiple radio buttons are selected. Help much appreciated. class RedioButtonCell: UITableViewCell { var radioButtonDelegate: RedioCellDelegate? var cellindexPath : IndexPath? @IBOutlet weak var

PFQueryTableViewController not showing custom cells

馋奶兔 提交于 2020-01-16 12:42:48
问题 I have a subclass of PFQueryTableViewController that I am trying to show in a container view (as a subview). My problem is that I cannot get the custom cells to show in the tableview. I have verified the following via debugging: The tableview is being added to the parent view The tableview is a PFQueryTableView Controller as it includes the default pull to refresh The PFQuery is returning the correct number of objects The CellForRowAtIndexPath method is being called and iterating through the

Swift - create different instances of custom Views

风格不统一 提交于 2020-01-16 11:59:20
问题 I am working on an app in which the user has access to different lists. I will show some pictures for a better understanding. This is my "Main-Menue" where the user can add custom cells ("Main Wishlist", "List1", List2",..) to a UICollectionView . Each cell should in the end "contain" its own View with a TableView inside of it. The View appears by clicking on the cell : This is how I let the View appear: @IBAction func createListButtonTapped(_ sender: Any) { // "Liste erstellen" button was

ios13 prevent pulling down on tableView which is scrolled to top from dismissing sheet style modally presented viewController [duplicate]

别来无恙 提交于 2020-01-16 09:01:08
问题 This question already has answers here : Disable gesture to pull down form/page sheet modal presentation (9 answers) Closed 2 months ago . I have a tableViewController which is presented modally with the default sheet style presentation. I want to keep this modal style as it looks good and works well in my app. And I like the dismiss when pulling down on the navigation bar. However what I don't want is pulling down on the tableView cells to cause the tableViewController to be dismissed when

Programming TabBarController with Navigation in appDelegate

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-16 08:42:48
问题 I am trying to include a navigation controller within the third tab of my tabbarcontroller. I have had some feedback but am only able to get about this far. The code below doesn't produce any errors, but does not seem to work as the app just quits out. Does anyone have any input on what I might be doing wrong? UIViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"PDCFirstViewController" bundle:nil]; UIViewController *viewController2 = [[SecondViewController alloc]

Swift - remove cell from TableView after Button-Tap

笑着哭i 提交于 2020-01-16 08:39:10
问题 in my project I have a UITableView . The cells inside of that contains among other things a UIButton which acts like a "check-box", so the user can tick of a task. My question: How can I delete a cell after the user presses the UIButton inside of it? This is my customCell : import UIKit class WhishCell: UITableViewCell { let label: UILabel = { let v = UILabel() v.font = UIFont(name: "AvenirNext", size: 23) v.textColor = .white v.font = v.font.withSize(23) v

Added table view cells follow 1 custom style?

a 夏天 提交于 2020-01-16 08:29:14
问题 I am wanting to create a custom UITableView cell. I would like to know how to do this. I understand how to actually create it and write code for it, but how can i create 1 style and then when i have more cells added, i want the same style. How can i do this? Is there a way to create 1 custom cell and have all the other cells that i want to add later follow this cells style?Thanks for the help! 回答1: In my projects I'm implementing method that creates custom style programmatically. Also it is

obtain data from UITextField in UITableViewCell

孤街醉人 提交于 2020-01-16 06:56:46
问题 I have crated this tableview to obtain the users children's names and store them into an array called dependentsArray : I have searched through stackoverflow, Apple documentation, google, and youtube tutorials, and cant seem to find a solution. This seems like it should be simple but its causing quite the headache. The closest i found to a solution was this post: getting data from each UITableView Cells Swift However, i am not obtaining the cells textfield value by tapping them, so i cannot