Name button on custom cell, show profile - swift [duplicate] - ios

This question already has answers here:
Get button click inside UITableViewCell
(18 answers)
Closed 6 years ago.
I am having the hardest time trying to figure out, how I get a button working, on my custom cell? Since I cannot use performSegue in a custom cell? How can I do that, can anyone tell me how you would do it?
Hope you can :-)
Sorry for no code!

are you want to push on another controller when click on profile button ?
So you need to implement a delegate method for button action than you can push on another controller.

Related

SwiftUI: Show TextField Keyboard as soon as View loads? [duplicate]

This question already has answers here:
SwiftUI: How to make TextField become first responder?
(23 answers)
Closed 2 years ago.
I have a screen in my app that contains a TextField.
I want the keyboard for the TextField to be displayed on default (i.e. as soon as the user navigates to the view, the keyboard should already be up).
How is this accomplished?
You have to just make an outlet from textfield and follow the following code.
https://stackoverflow.com/a/49815898/5086658

How to create a tableView into AlertView? [duplicate]

This question already has answers here:
How to add a UITableView inside the UIAlertView in iPhone?
(5 answers)
Closed 5 years ago.
I have a problem, I don't know how to create a tableview into a AlertView like this image:
I think it's better to use a popover View Controller instead, but if you MUST do it you can check out this answer
hope this was helpful :)
You can use UIView instead of UIAlertView. It is easy to use.

Swift 3 Show the 'Copy' popup on UITableViewCells when select cell of table like Contaccts app [duplicate]

This question already has an answer here:
How to show "Copy" menu for a table cell?
(1 answer)
Closed 6 years ago.
How to show popup "copy" when select cell of table ?
You can't do it the normal way with UILabel. If you still want to do it, use UITextField instead and disable editing (It will act as label and allow text selection). If you want to use UILabel anyways, you might want to look into UILongGestureRecognizer and UIPasteBoard. Add gesture to the label and on its delegate method, copy text to paste board.

How To Detect When The Minus Button in a UITableViewCell Was Tapped During Editing? [duplicate]

This question already has answers here:
UITableView : detecting click on '-' button in edit mode
(2 answers)
Closed 9 years ago.
I have a UITableView with editing enabled. I'd like to hide specific elements of a cell when the minus button is tapped, but can't find a way to detect that the minus button was tapped. Anyone know how to detect this?
You will have to subclass UITableViewCell, and implement the method willTransitionToState

On iOS, which view element is supposed to be like radio buttons? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Best radio-button implementation for IOS
I am looking at my storyboard and trying to make a radio button choice, but I do not see anything that is resembling radio buttons. Which ui element is meant to do that in ios?
I see the picker view, but I don't think this is equivalent to the radio buttons.
Thanks!
This is most commonly handled by using a grouped table view, and putting a checkmark next to the selected item.
For an example, open Settings app and go to General, then Auto-Lock. You are presented a list of choices; the selected one will have a checkmark. Tapping any of them will move the check.
You can do this fairly easily with a storyboard to set up a tableview, and a bit of custom code to toggle the checkmarks.

Resources