Skip to main content

Posts

Showing posts from August, 2017

Set shadow for UIView on 4 side (top,right,bottom and left)

UIView *rateVW=[[ UIView alloc ] initWithFrame : CGRectMake (+ 25 , [[ UIScreen mainScreen ] bounds ]. size . height / 4 - 30 , [[ UIScreen mainScreen ] bounds ]. size . width - 50 ,   [[ UIScreen mainScreen ] bounds ]. size . height / 2 )];     rateVW. layer . cornerRadius = 5 ;     rateVW. backgroundColor =[ UIColor whiteColor ];          rateVW. layer . shadowColor = [ UIColor blackColor ]. CGColor ;     rateVW. layer . shadowOpacity = 0.7 ;     rateVW. layer . shadowOffset = CGSizeZero ;     rateVW. layer . shadowRadius = 4 ;     rateVW. layer . shadowPath = [ UIBezierPath bezierPathWithRect :rateVW. bounds ]. CGPath ;      [ backView2 addSubview :rateVW]; Enjoy Coding...!

Rate Us in ios.

#define YOUR_APP_STORE_ID 545174222 //Change this one to your ID static NSString * const iOS7AppStoreURLFormat = @ "itms-apps://itunes.apple.com/app/id%d" ; static NSString * const iOSAppStoreURLFormat = @ "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d" ; [ NSURL URLWithString :[ NSString stringWithFormat :([[ UIDevice currentDevice ]. systemVersion floatValue ] >= 7.0f )? iOS7AppStoreURLFormat : iOSAppStoreURLFormat , YOUR_APP_STORE_ID ]]; // Would contain the right link

AFNetworking Post Method

AFHTTPSessionManager *manager = [ AFHTTPSessionManager manager]; NSDictionary *params = @{@ "user[height]" : height,                          @ "user[weight]" : weight}; [manager POST:@ "https://example.com/myobject" parameters:params progress:nil success:^( NSURLSessionTask *task, id responseObject) {     NSLog (@ "JSON: %@" , responseObject); } failure:^( NSURLSessionTask *operation, NSError *error) {     NSLog (@ "Error: %@" , error); }];