Clickable Link in Editable TextView ios 6 [duplicate] - iphone

This question already has answers here:
How to make UITextView detect links for website, mail and phone number
(8 answers)
Closed 9 years ago.
I set the editable property of UITextView yes as I need the UITextView editable then in that case How could be possible to click the link in UITextView ? Is there anyway to fix out my problem

You have to set detect type of UITextView in implementation file like
textview.editable = NO;
textview.dataDetectorTypes = UIDataDetectorTypeAll;

Related

Can't click the buttons inside a TableViewCell in iOS 14 [duplicate]

This question already has an answer here:
Selectable objects on UITableViewCell not responding to user input on iOS14
(1 answer)
Closed 2 years ago.
In iOS 13 it works perfectly, but I am not able to make a simple tap on a button work within a TableViewCell. Is it happening to someone else? Has the way of doing this changed?
Solved!
You have to add your views to cell contentView like this:
contentView.addSubview(button)
and anchor your button to contentView:
button.topAnchor.constraint(equalTo: contentView.topAnchor).isActive = true

How to Display Underlined Text in a Button : iphone [duplicate]

This question already has answers here:
Underlining text in UIButton
(18 answers)
Closed 9 years ago.
I want to display the mail ID in my view such that clicking the mail ID should open the mail composer view.
I want to display the button text as underlined to show it is a hyperlink and for the button click event to call the mail composer view. At present, I am not able to show the button text underlined.
You can use UILabel to implement this Tack look at TTTAttributedLabel for display underline label. And add TapGestureRecognizer to label and in that TapGestureRecognizer method implement code to show MailComposer.

How to display the textfield when click on the button [duplicate]

This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
How to add UITextfield on click of UIButton and make it editable
I want to display the UITextField which becomes editable when click on a button.
if any one knows please give me the answer.
Create an IBAction for the UIButton like this:
-(IBAction)showTextFied:(id)sender{
yourTextField.editable=YES;//turn to editable mode if it's not
[yourTextField becomeFirstReponder];//show the keyboard
}

How to change UISwitch name in iphone? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to customize UISwitch button in iphone?
How to change name of UISwitch (like on,off) i am creating UISwitch in Xib so i want to change the name like yes or no.
You will have to create a custom switch...
http://www.catamount.com/blog/1063/uicustomswitch-customizing-uiswitch-color-it-change-labels/
this should help
There is no public API method for changing the text on an UISwitch
You should use a UISegmentedControl or a Custom UISwitch
This one I found is very useful for creating the custom switch
http://osiris.laya.com/projects/rcswitch/
You can create the custom switch and there will not be any problem in apple approval.

UITableView Header (not section header) problem [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Adding iOS UITableView HeaderView (not section header)…
I want to make a tableview header like in the contacts app:
Exactly like there, am image beside a label above the table.
Any way doing that?
Thanks!
Did you try a custom UIView with 2 subviews, a UIImageView and a UILabel, for a header?