Posted on November 24th, 2015 by Deepak Vashisht
In a window based App, if we want the whole application to be animated then we have to write code for animation in each views that has been added to the application. –>I have another solution that saves time and easier to implement. This can be done simply by writing few lines of code. […]
Posted on November 24th, 2015 by Abhishek Gupta
To add your app in NewsStand add the following key in Info.plist <key>UINewsstandApp</key> <true/> Now your app is NewsstandApp. But to show your app in newsstand you need add the newsstand icon in the info.plist that are different from the application icon. Adding the newsstand icon to info.plist: <key>CFBundleIcon</key> <dict> <key>CFBundlePrimaryIcon</key> // these are […]
Posted on November 24th, 2015 by Abhishek Gupta
To add your app in NewsStand add the following key in Info.plist <key>UINewsstandApp</key> <true/> Now your app is NewsstandApp. But to show your app in newsstand you need add the newsstand icon in the info.plist that are different from the application icon. Adding the newsstand icon to info.plist: <key>CFBundleIcon</key> <dict> <key>CFBundlePrimaryIcon</key> // these are […]
Posted on November 24th, 2015 by Priye Saurabh
Menu Bar is not a custom control But we can design it easily using two UIView ,UIButton and UIlabel. Just on button action we can remove it from superview the one containing list. But generally adding it to navigation bar is a bit tricky. General Idea (Menu) We can use two views one containing one label […]
Posted on November 24th, 2015 by Shilpa Kadiyan
Using JavaScript, we can find the location of the buttons by using below code. Here is the script that’s to be run before calling the position Function.Below script is having theposition function(func to calculate the X and Y coordinate of buttons) [_webViewstringByEvaluatingJavaScriptFromString:@”var script = document.createElement(‘script’);” “script.type = ‘text/javascript’;” “script.text = \”function positionX(id){ ” “{” […]
Posted on November 24th, 2015 by Priye Saurabh
Suppose you have two video files with name video1.mp4 and video2.mp4 and want to merge them into a single video programmatically this tip might help you. Follow the instructions given below- First, we need to add following frameworks in our project: a)AVFoundation framework b)Asset Library framework c)Media Player Framework d)Core Media frame work Then we need […]
Posted on November 24th, 2015 by Shilpa Kadiyan
Set the image using method setBackgroundImage:forBarMetrics. [[UINavigationBarappearance] setBackgroundImage: portrait forBarMetrics:UIBarMetricsDefault]; [[UINavigationBarappearance] setBackgroundImage: landscape forBarMetrics:UIBarMetricsLandscapePhone]; Create resizable images UIImage *portrait = [[UIImageimageNamed:@”image1″] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; UIImage *landscape = [[UIImage imageNamed:@”image2″] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0,0)]; Set the attributes of Naviagtion Bar (to set the title font, color, shadowoffset) [[UINavigationBarappearance] setTitleTextAttributes: [NSDictionarydictionaryWithObjectsAndKeys: [UIColorcolorWithRed:255.0/255.0green:255.0/255.0blue:255.0/255.0alpha:1.0], UITextAttributeTextColor, [UIColorcolorWithRed:0.0green:0.0blue:0.0alpha:0.8], UITextAttributeTextShadowColor, […]
Posted on November 24th, 2015 by Surbhi Garg
We can stop Copy, Paste on Text boxes and Text views, or any text on iphone on hard press on them, on a UIView by including this method in .m file – (BOOL) canPerformAction:(SEL)action withSender:(id)sender { if ([UIMenuController sharedMenuController]) { [UIMenuController sharedMenuController].menuVisible = NO; } return NO; }
Posted on November 24th, 2015 by Surbhi Garg
We can handle these by Calling Notifications for KeyboardDidShow/ KeyboardWillShow methods. But when default KeyBoard is there on the screen at that time these notification methods are not called in that case we have to call the method for calling the DONE button as the keyboard subview. On the DONE button press we can remove […]
Posted on November 24th, 2015 by Subrat Kheti
Basically, in a project if more than one developer are working and one developer has added some files(it may be .h,.m or any .png) and commits the project including .xcodeProj in source control management. But due to some reason developer removes files or images from the project and also removes the use of those files […]
Posted on November 24th, 2015 by Kapil Kumar
Merging two images to create one single image file. Suppose we have two images with name file1.png and file2.png The code below merges two images. @implementation LandscapeImage – (void) createLandscapeImages { CGSize offScreenSize = CGSizeMake(2048, 1380); UIGraphicsBeginImageContext(offScreenSize); //Fetch First image and draw in rect UIImage* imageLeft = [UIImage imageNamed:@”file1.png”]; CGRect rect = CGRectMake(0, 0, […]
Posted on November 24th, 2015 by Abhinav Singh
So often while coding we use the imageNamed function of the UIImage whenever we have to load an image from resource folder but there is problem associated with it as it always caches the image. Suppose you are loading images for some photoscroller type of application, or in a scrollview, etc and loading many images […]
Posted on November 24th, 2015 by Subrat Kheti
On certain condition if we want to post some message on Facebook wall without using Facebook dialog box but by using a customize box having a textField. It can be achieved using GraphAPI. I am assuming already you have a box with UITextField and button as postToFacebook. And what ever we have written on that […]
Posted on November 24th, 2015 by Deepak Vashisht
In many applications , there is a need to retrieve a specific portion of data from a string or to remove a few lines of text present at various places inside a string. This can be performed in various ways. I am taking HTML string and using various method replacing data present within the tag […]
Posted on November 24th, 2015 by Waseem Ahmad
Generally UIWebView does not support the Touch Event directly. We can handle it, using the UIGestureRecognizer. For this we need to implement it’s delegate method which always return true. – (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer; #import <UIKit/UIKit.h> @interface WebTocuh : UIWebView<UIGestureRecognizerDelegate> @end @implementation WebTocuh – (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { UITapGestureRecognizer* tabGesture […]
Posted on November 24th, 2015 by Subrat Kheti
//Address we want to search NSString* addressText = @”Mindfire Solutions,SaritaVihar,NewDelhi”; NSString* searchQuery = [addressText stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; NSString* urlString = [NSString stringWithFormat:@”http://maps.google.com/maps?q=%@”, searchQuery]; //open the specified location on googleMap [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]]; We can use it as method and pass the address as string. on calling the method the googlemap open and show the […]
Posted on November 24th, 2015 by Rinku Dahiya
Whenever we have any static library in our project and we want to make archive( .ipa) of that project. Compiler won’t allow us to make archive of that as it shows an warning ““[Project name] does not contain a single–bundle application or contains multiple products” error in Xcode 4.2. So, there is only a single […]
Posted on November 24th, 2015 by Deepak Vashisht
n many a application, we need to fetch photos from Photos application of the iOS device. And for that developer normally use UIImagePickerView that has a default layout and using that we can access photo library of the device. But in case we want to create custom views within the application for photo albums, for […]
Posted on November 24th, 2015 by Rinku Dahiya
Step 1. Open up info.plistof the project (Application) in the Xcode. Step 2. Right click on any of the property field there. And choose “Add Row” from the popup menu. Step 3. Select “URL types” as the Key in that new row. Step 4. Expand “Item 1” and provide a value for the URL identifier. This can be […]
Posted on November 24th, 2015 by Surbhi Garg
Have you ever come across a problem where dealloc of ViewController was not getting called? Yes, there can be a case where it can happen. I was adding a View as subview to another View like as follows [self.view addSubview:_secondViewController.view]; _secondViewController is an object of SecondViewController SecondViewController has a Valid NSTimer object. then i remove […]
Posted on November 23rd, 2015 by Surbhi Garg
@Class- Is used when we only want to declare the object of any class.. For example: in .h file @class Mindfire; @interface MindfireSolutions :UIViewController { Mindfire* _mindfire; —- } This is done because neither we want to use the methods of “Mindfire” Class at this time nor we want to set the […]