Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
How to get Image Filters in Core Image framework
Hi Readers!
Many times we need to check what Core Image filters do we have in iOS framework. Here is a simple code to get all the list of filters with their attributes. This will be easier for you to check and apply any filter on an image.&nbs...
How to create UINavigationController Based Application in iOS
The UINavigationBar class provides a control for navigating hierarchical content. It’s a bar, typically displayed at the top of the screen, containing buttons for navigating within a hierarchy of screens. The primary properties are a left (...
How to launch Apple Maps from iOS app
Hi Readers!
Below is the code to launch the Apple Maps application and display the directions between 2 points on Map.
Example 1: Display directions
MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2...
Sorting an Array ios
Hello Readers,
To sort an array in ios you may use the following code snippet:
// Name of the key on basis of which you want to sort
NSSortDescriptor *dateDescriptor = [NSSortDescriptor
sor...
Different AppStates in iOS
THESE ARE THE APPSTATES IN IOS
AppState tell that whether the app is running in foreground or background or when the state changes..
In early versions of iOS three states were supported : n...
Get the list of All Available Font in ios
To get the list of all the font that is available in xCode you can use this code.
for (NSString *name in fontnamesArray) {
NSLog(@"Font Family: %@",name);
NSArray *fontFaces = [UIFont fontNamesForFamilyName:name];
...
Ajax calls start failing if my app is inactive; otherwise they work just fine on WiFi
In my Phonegap based hybrid app: Ajax calls start failing if my app is inactive for say a couple of minutes. My connection is WiFi & what happens is ajax calls fail with status 0; but navigator.connection.type still shows ...
DIFFERENCE BETWEEN C , C++ AND OBJECTIVE-C
Below are some important difference between C , C++ AND OBJECTIVE-C
C is a procedural language. C++ is procedural as well as object oriented programming language. Objective-C is a general-purpose, high-level, object-oriented programming lan...
History of Objective-C
History of Objective C
Brad Cox and Tom Love are those famous personalities who invented Objective C in 1980 for their company Step stone. They introduced Smalltalk at ITT corporation's programming technology centre in 1981.
Brad ...
UIAlertController in iOS
For iOS 8 and above Apple have introduced UIAlertController to present action Sheet and alerts.
In order to present alert set preferredStyle to UIAlertControllerStyleAlert and for actionSheet preferredStyle to UIAlertControllerStyleActionShee...
Camera Zoom in and out problem
Hello everyone,
Please help me .
I am working on iOS + Cordova platform
I am implementing Zooming functionality in Native iOS in Camera plugin.
But in Which file I have to do that..
And i Want to Zoom camera within View.
Please help guys ...
Auto Layout Using Visual Format Language In Swift
Hi All,
You can add auto layout constraints by using Storyboard Interface OR by adding constraints dynamically. There are three ways to add constraint dynamically (as per Apple Inc.)
Visual Format Language is one of the way is used to a...
Auto Layout Using NSLayoutConstraint In Swift
Hi All,
You can add auto layout constraints by using Storyboard Interface OR by adding constraints dynamically. There are three ways to add constraint dynamically (as per Apple Inc.)
NSLayoutConstraint is one of the way is used to add autol...
Adding auto layout constraint dynamically in swift
Hi All,
You can add auto layout constraints by using Storyboard Interface OR by adding constraints dynamically. There are three ways to add constraint dynamically (as per Apple Inc.)
Layout Anchor is one of the way is used to add autolayout...
NSTimer In Swift
Hi all,
You can use the NSTimer class to create timer objects or, more simply, timers. A timer can wait and call a method or selector after defined period of time. for example :- if you want show a seconds clock and stop when it completed 60 s...
Zoom mapview to show all annotaions
Hi all,
If you are adding multiple annotation in your amp and you want to show all annotations initially. then just call this method after adding all annotation to your mapview.
There are some globally declare variable such as :-
#defin...
Display Splash Screen for longer Time in iOS
Splash Screen is the first screen which appear when we launch an application and disappear when the main screen get loaded. It appear for a few second to show that our app is fast and responsive .
In order to display your splash screen more t...
Error Handling in Swift 2
SWIFT
Swift is a very powerful and simple programming language which is used for creating the iOS applications.Swift is a language which is designed to work with Apple's Cococa and Objective-C. The advantage of this language is that it is one...
How to print without newline in swift 2.0
Hi Readers!
In swift 2.0, print() statement adds a new line character automatically, where as in swift 1.2, println() and print() were 2 separate functions.
Apple in 2.0 has given only 1 statement for print() with different parameters.
T...
How to declare Sets in Swift
Hi Readers!
Let us first understand what Sets means.
Sets
A set stores unique values of same type in a collection with no ordering. Sets should be used when there is no defined order, such as in Array. Secondly Array can store multiple ...
How to play a video file ios
Hello Friends,
Create an object of MPMoviePlayerController:
MPMoviePlayerViewController *moviePlayerController;
NSURL *videoUrl=[NSURL URLWithString:@"String value of your url"];
Initialize the instance of MPmoviePlayerViewControl...
Deleting Cells of tableview ios
Hello friends,
To delete a cell at a particular indexpath you may use the following code:
-(void)removeItemAtIndexPath:(NSIndexPath *)indexPath{
[(name of table) beginUpdates];
// I am assuming that you're just using a plain NSMut...
Change color of polyline
Hi all,
If you want to change the color of a polyline or route on map just change the color in this delegate of map.
- (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id <MKOverlay>)overlay
{
MKPolylineRen...
Adding card with braintree
Hi All ,
These are simple steps to add card to braintree account in iOS.
1.Initialize braintree object with valid client token.
BTAPIClient *token = [[BTAPIClient alloc] initWithAuthorization:@"cleintToken received from tree"];
...
Unwind segue in iOS
To Use Unwind Segues in iOS.
1- Create three controller using storyBoard
2- Push from FirstViewControleller to SecondViewController
3- Push From SecondViewController to Third
Write a function in FirstViewController like this
-(IBAction...
Crop Image in iOS
To crop image in iOS use the following method.
it will crop the image from the visible frame of the imageView.
-(UIImage *)imageFromImageView:(UIImageView *)imageView rectFrame:(CGRect)frame{
UIGraphicsBeginImageContextWithOptions(frame....
CameraPreview problem.
Hello Everyone,
I am working on iOS + Cordova platform.
When i clicked on camera button ,the preview is not coming..
Any thing i Have to add in JS file or CameraPreview.m file to interact to each other...
Please help.
I am new in Cordova a...
Merge images to make a single image
It is easy to merge different images to make a single image. It is like pasting images to a canvas and taking picture of that canvas. Below I have explained how to do it.
-(UIImage*)combineImages:(NSMutableArray *)images{
CGRect frame =...
Slide menu application in iOS.
Hi Friends,
I know there are several applications which are using Slide Menu option. You can find several libraries or classes in Objc to build an app like that.
Here is the most easy and customizable class to get it. Its name is SKSlideVie...
Fetch the user detail from facebook in iOS 9.0
To fetcht the user detail from facebook like name,first_name,last_name,middle_name,gender etc use the code below :
func fetchUserDetails(useid: String,accessToken:String)
{
let graphRequest : FBSDKGraphRequest = FBSDKGraphRequest...
login to facebook in ios 9.0
to login using facebook in iPhone sdk please use the code below.
install the pods for facebook using
pod "FBSDKCoreKit";
pod "FBSDKLoginKit";
pod "FBSDKShareKit";
pod "FBSDKMessengerShareKit"
import FBSDKLoginKit
...
Send a request using Alamofire in swift
Use the alamofire in swift first install the pod file in your project using below steps:
1- open the terminal and run following commands
sudo gem update --system
sudo gem install cocoapods
pod setup
change folder to the current proejct ...
Listing the videos stored in gallery
Hello friends,
The following code can be used to show the videos stored in gallery:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePicke...
Sending notification to IOS device using C# code
In one of my current project, I had to develop and integrate the IOS notification functionality in my server side C# code. I did some RnD for this and found below mentioned code to serve this purpose.
public void SendNotification(string device...
Change UISearchBar Field Text Color in iOS
You can change UISearchField text color in iOS. Use single line of code to do it.
[[UILabel appearanceWhenContainedIn:[UISearchBar class], nil] setTextColor:[UIColor whiteColor]];
Happy Coding!!!
Could not inspect the application package when using device
Could not inspect the application package when using device
How to use completion handler in swift
The code below will help you in declaration of completion handler and how to call the completion handler in swift.
To declare a completion handler in swift use the line :
typealias completionHander = (sucess: Bool)->Void
//decalrat...
Compare two dates in iOS
To compare two dates we can use the following code :
NSComparisonResult result = [mydate1 compare:mydate2];
//where mydate1 and mydate2 are two dates we want to compare.
if (result == NSOrderedDescending) {
//mydate1 is later than myda...
Detect if an Internet Connection exists in iPhone using (ARC and GCD compatible) class
Hi Readers,
Below are steps you need to follow when you are checking if their is an Active Internet connection in an Iphone using (ARC and GCD compatible) class.
1) Add SystemConfiguration framework to the project but dont worry about inclu...
How to change the font of SearchBar's Placeholder and TextField
To change placeholder font add the following code:
[[UILabel appearanceWhenContainedIn:[UISearchBar class], nil] setFont:[UIFont fontWithName:@"Helvetica" size:12.0]];
and,to change the font for the SearchBar textField add the following lin...
Change the button background color when highlighted in swift
To create a button at run time in swift please use the followin code:
this code will help you in creating a button at run time. and also change the background color of the button in highlihted State..
To change the button background at the tim...
Changing TextField Placeholder Color
Hello friends,
We may change the text field placeholder color using either storyboard or using code.
Using Storyboard:
Choose the text field and under textfield runtime attributes click on the '+' button and add a key:
_placeholderLab...
How to display annotation on any Location in MKMapView
If we want to display the annotation point on any coordinates in MKMapView use the following functions-
By using the annotation anyone can easily recognize the location.We can also set the Title here which will show when user click on that...
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 Show a pdf File from URL in a UIWebview in iOS
when we want to open the pdf file from a URL string then we use the UIWebView. In webview we can directly open the file by loading the url request.use the following function--
-(void)addWebViewOverLay:(UIWebView *)webView {
webView = [[UI...
How to create first iOS application in Xcode?
How to create first iOS application in Xcode for iPhone with no programming experience where Ill help even the non-programmer to enjoy coding as an iOS developer.
This is an XCode tutorial for beginners so Ill be going through where to downlo...
How to show a overlay view in ios
Sometimes we need to show a overlay view over the main view so that user not able to click on the background view assets like button click.
in order to display the overlay view use the following function--
- (void)getOverlayView{
overlay...
Seat Selector For iOS
Hi All,
Now days , we start booking seats online so if you also want to implement seat selection functionality than follow these steps .
Download ZSeatSelector from this link https://github.com/richzertuche/ZSeatSelector
Now drag two fil...
Show a route between two coordinates using MKMap view in iOS
In ios when we want to show a route or poly line between two coordinate then we use the following function.
most of time we use this when we want to dislplay the route from current location to destination address.
Here mapView is the property...