Featured
-
No Featured Found!
Tags
Convert Hexacode to UIColor in objective c
To convert the hexacode to color we can create a category of UIColor and implement the following code -
it will return the code corresponding to that hexacode
Hexa code can be in following format
1- #RGB
2 -#ARGB
3- #RRGGBB
4- #AARRGG...
Pusht to new ViewController with top to bottom animation
Hi,
Normally when we push to a ViewController it show the animation from left to right.
But we can change this to animation from to top to bottom.
here is the code to push a view controller from top to bottom.
- (void)pushFromTop:(U...
Saving secure data into keychain wrapper for app security
Hi Readers,
The keychain service provide a secure way to store content such as passwords, keys, certificates, etc. Each iOS app has a separate requirement to save items. There is a class named KeychainItemWrapper which provide you service to s...
Make Paypal Payment in iOS
To Integrate paypal in iOS App use the steps below:
1- Install Pod for paypal
platform :ios, '6.0'
pod 'PayPal-iOS-SDK'
2- #import <PayPalMobile.h> to your viewController.h and also set the delegate in .h @interf...
Blend Image in IOS
if you want add the custom frame on image like a border then
1- Add the GPU image Third party library to your project .
2- Use the image with imagename that you want to use as border image of originanl Image.
3- Framed image will the out...
How to create Triangular imageview in objective C
Here is the code for creating the triangular uiimageview -
UIBezierPath *bzrPath = [UIBezierPath new];
[bzrPath moveToPoint:(CGPoint){0, self.imgView.frame.size.height}];
[bzrPath addLineToPoint:(CGPoint){80, 0}];
[bzrPath...
Fetch the poi from google in ios
To fetch the poi from google we can use the GOOGLE API to get the list of POI near user location.
1- For creating the Key you can get the refrence from Link : https://developers.google.com/maps/documentation/ios-sdk/get-api-key#overview
...
How to get time intervals in hours between start time and end time in objective C
If we want to get the time intervals between the start time and end time then use the following code-
it will return the array of hours according to the start time and end time.
+ (NSMutableArray *)getTimeIntervals:(NSString *)startTime a...
Change the Flash mode of camera in ios
To set the camera flash on or off in ios Use the code below:
-(void)setFlashMode:(AVCaptureFlashMode)flashMode forDevice:(AVCaptureDevice *)device
{
if ( device.hasFlash && [device isFlashModeSupported:flashMode] ) {
...
Image is Blurred after cropped from a view
if you are going to take a snapShot of a view in ios and resultant image is blurred please change your code to following.
CGRect rect = [ScreenShotView bounds];
UIGraphicsBeginImageContext(rect.size);
Please change thi...
Take the ScreenShot of View with Tabbar & NavigationBar
To Take the screen shot Of a view with navigation & tabbar You can use this code:
-(UIImage *)getImageWithNavigationBarInIOS
{
CALayer *layer = [[UIApplication sharedApplication] keyWindow].layer;
CGFloat scale = [UIScre...
Parsing JSON objects using Mantle framework in Objective C
Hi Readers,
Mantle is latest and reliable framework which we can use while parsing JSON objects coming from server end. We can do this by simply initialize a class of type MTLModel.
We can understand framework working with following example...
Array of dates between two dates
Hello Friends,
To create an array of dates between two dates you may use the following code:
1.Create an NSMutableArray
NSMutableArray *datesArray = [NSMutableArray new];
2.Set the date formatter according to your requi...
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...
Set the maximum date in UIDatePicker to Today
To set the maximum date of date picker in ios to today.
for example , if we want to pick the date of birth of a user then the date is can not be greater then today date .
So we can use following step to set the maximum date of datePicker
...
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....