Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Add Input Accessory View above UIKeyBoard in iOS

If you come across a requirement where you want to add a custom view just above the UIKeyBoard, then you can use below code to do that. If you want to show custom view on tapping inside any UITextField or UITextView, Write below line of code i...

How to give background color to superview only with alpha less than 1.0

Hi, In many cases we have to give a background color to a superview with alpha less than 1.0. If we give color from XIB/storyboard to a superview with alpha 0.4 then it assigns the alpha 0.4 to its subviews also. What if we need to give al...

How to set Camera view aspect ratio in ios

Some times we face problem with Camera view aspect ratio in ios. Solution to this problem is here.. Set its aspect ratio property to AVLayerVideoGravityResizeAspectFill. It actually preserve aspect ratio; fill layer bounds. AVLayerVideoGr...

Change color of an UIImage in ios

You can pass array of colors in this function in order to change any color of an UIImage. Just pass UIColor and UIImage to this function. +(UIImage *)changeColorTo:(NSMutableArray*) array Transparent: (UIImage *)image { CGImageRef rawIma...

Change UIIMage background color in iOS

Here is a function which returns an image with different background of you choice. - (UIImage* )setBackgroundImageByColor:(UIColor *)backgroundColor withFrame:(CGRect )rect{ // tcv - temporary colored view UIView *tcv = [[UIView alloc] ini...

Make UIImage White Background Transparent in iOS

If you came across to a requirement where you want to make UIImage Background Transparent then use below method to achieve it. +(UIImage *)changeWhiteColorTransparent: (UIImage *)image{ CGImageRef rawImageRef=image.CGImage; const CGFloat c...

Autoplay media files in UIWebView in IOS

When displaying media content using HTML5 in a web view on IOS the autoplay functionality does not work. To enable to web view to autoplay the media (if coded in HTML to autoplay) you need to add a line of code in your IOS application as expla...

How to share post/pics/link using IOSLinkedInAPI

Hello Reader's, I m using IOSLinkedinAPI to Share Video link to LinkedIn. But i m giving option to share picture URL , links and text post to LinkedIn. Install AFNetworking using pods. Download IOSLinkedinAPI and drag-drop "IOSLi...

iOS kV difference between self.variable and _variable

Variable names starting with _ are instance variables of that class. self.variable is calling a getter/setter method on your object. The class must be key-value coding compliant for the property, as specified in Ensuring KVC Compliance.

How to get sub strings from a string using Regular Expression

Hi, The below code is to get substrings from a string. You are going to love this below code which is very simple but very effective. I have used regular expression to get the sub strings. NSString *strTest = @"Hii how are you doing @Ravi , h...

How to take Backup of MYSQL Database file and upload it on Dropbox Account?

Hello, I am sharing here how we can take backup of our Project mysql database file and upload it in our Dropbox Account. Advantage using this feature is we can store our database backup in our Dropbox account daily. We can set our script as a...

When to use copy Attribute in declaring a property in objective c

We all use attributes in Objective C to declare properties. Attributes commonly used are strong, nonatomic, weak, assign. But we never take it seriously why we are using these attributes. One of the common mistakes I often see is the wrong us...

Rounded corner in XIB or storyboard

Hi, I am writing for the first time on FindNerd. Many times we need to make buttons, labels, imageview, view to have rounded corner. and we write code as below to perform it. [redButton.layer setCornerRadius:15.0f]; [redButton.laye...

Tabbar Customization

Snippet works all around to customize the tabbar icons & texts display color for selected and unselected state for iOS7 self.tabbarController.tabBar.tintColor = [UIColor greenColor]; Below code can be used to customize the text look. ...

Fetch All Notifications

Snippet to fetch all local notifications of the app. One can customize any notification and cancel the same. UIApplication *app = [UIApplication sharedApplication]; NSArray *eventArray = [app scheduledLocalNotifications]; for (int ...

ASIFORMADATA uploading Bar

Hello Guys, There are different issues while uploading a video to a server. -videoSize video Quality. Now uploading depends on internet speed and file sizes and it can take almost a minute to upload a video. Developers use Activity Indi...

Remove Data from doucument Directory ios

Hello friends, I was using to document directory to save images and video and after saving a lot my app use to crash due to memory warnings. So there is a way to delete content of document directory. -(void)deleteDD { { NSLog...

Importing Fonts to XCode

iPhone provides number of fonts for developing the app but not all. Sometimes we need to go beyond the fonts provided by iOS sdk. Following steps will do the needful 1) Add desired font to project (It must be .tff or .otf); 2) Go to info....

Create audio file manually

We often come across conditions where manual audio file is to be created. For example recording an audio or download audio data from server. These all need audio file in which data is to be populated. Below, I'm creating an sound.caf file and...

Get a rotated image

A very good stuff that allows you to get rotated image. Sometimes we rotate the UIImageView, it appears like image is rotated but in actual it's the UIImageView which is being rotated. If we try to fetch the image from rotated UIImageView it will...

Convert NSString to NSUrl

Hello, Convert a NSString to NSUrl If you want to convert a NSString to click able Url then you have to use this code using escape dataString. NSString *string= [NSString stringWithFormat:@"https://maps.google.com/"]; NSString...

Convert Facebook Datetime format in iPhone

Convert date format - 2013-10-31T07:41:39+0000 to 2013-10-31 01:48:11 +0000 NSString *dateString = [stringDate substringToIndex:19]; NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; formatter.timeZone = [NSTimeZone localTimeZo...

Using Property Lists (Plists)

Method to get a value from plist NSString *path = [[NSBundle mainBundle] pathForResource:@"PlistX" ofType:@"plist"]; NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path]; int number = [[[[dict objectForKey:@"One...
1 5 7 next
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: