Featured
-
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi -
Make UIImage White Background Transparent in iOS
If you came across to a requirement where you want
by ashish.nakoti -
User's location update on server when app is in background.
Code for those Apps where we need to update user's
by ashish.nakoti -
Animate button with zoom and bounce effect in ios
Many social apps are using bouncing effect for but
by ashish.nakoti -
Crop an image from UIImageView
With the following method stated below you can cro
by kuldeep.butola
Tags
How to make some part of string bold in UITextView or UILabel?
If you want to set some part of the UITextview to BOLD then you can implement the following code :-
NSString *str = @"I belong to Dehradun"; // default string
NSMutableAttributedString *attString=[[NSMutableAttributedStrin...
How to use NSAttributedString in UITextView?
We can use attributed string with textView by following steps -
1. Make a IBOutlet of your textView
for eg -
@property (weak, nonatomic) IBOutlet UITextView *textView;
2. Now go to storyboard and select your textVi...
How to change size of UITEXTVIEW according to its text ?
To change the size of a UITextView to its contents i.e as the content of the UITextView increases the size of the textview will also increase.
We can implement this by applying the following code :-
- (void)textViewDidChange:(UITextView *)t...
How to add placeholder inside UITextView
To add placeholder UITextView first take outlet of UITextField
ex- @property (weak, nonatomic) IBOutlet UITextView *yourTextView;
Then follow these steps
1. In viewDidLoad add these line of code
self.yourTextView.text = @Please type he...
How to set placeholder text in uitextview
If we want to set the placehoder text in uitextview then we have to use the delegates methods of textview because there is not an option to set the placeholder directly in xcode.
Here is the methods--
-
(void)viewDidLoad {
[super vi...
How to detect tapped word in UItextview
We might face a situation when we need to add action on tapping a particular word from a string on the iPhone screen like a link or a hashtag etc. Now though we can easily add a UITapGestureRecognizer on a UITextView or UILabel, finding the exact...