Authorabdulgafar.nurbash

Customise UIImageView with circular shape and borders ?

C

UIImageView *customImage = [[UIImageView alloc] initWithFrame:CGRectMake(10, 100, 50, 50)];
customImage.backgroundColor = [UIColor blackColor];
customImage.layer.cornerRadius = 25.0f;
customImage.layer.masksToBounds = YES;
[[customImage layer] setBorderWidth:3.0f];
[[customImage layer] setBorderColor:[UIColor whiteColor].CGColor];
[self.view addSubview:customImage];

Load UITableView images in background Asynchronously ?

L

UIImageView *SponsorLogo = [[UIImageView alloc] initWithFrame:CGRectMake(15, 90, 40, 40)]; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^(void) { NSData *data0 = [NSData dataWithContentsOfURL:[NSURL URLWithString:@“your_image_URL_Here”]]; UIImage *image = [UIImage imageWithData:data0]; dispatch_sync(dispatch_get_main_queue(), ^(void) { SponsorLogo.image =...

Add iRates in iPhone/iPad application

A

1)Download iRate.bundle form Add iRate.bundle, iRate.h, iRate.m Add StoreKit.framework from Build phases 2)#import “iRate.h” in AppDelegate.h/AppDelegate.m 3)AppDelegate.h/AppDelegate.m #pragma mark – delegate methods for iRates – (void)iRateCouldNotConnectToAppStore:(NSError *)error { } – (void)iRateDidDetectAppUpdate { } –...

Convert non ARC files in ARC application and vice versa

C

1)If your application is ARC (Automatic Reference Counting), and try to use non arc files it will give you error, Then do this – Select Target – > Build phases -> Compile sources Double click on file which you want and write – (-fno-objc-arc) 2)If your application is NonARC, and try to arc files, Then do this – Select Target – > Build phases -> Compile...

Add UIButton on UITableView when drag , Swipe or touches moved on Cell Using UIGestureRecognizerDelegate in iPhone

A

//——– .h //Delegate UIGestureRecognizerDelegate UIButton *YourButton; //——– .m – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *SimpleTableIdentifier = @”SimpleTableIdentifier”; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SimpleTableIdentifier];...

Category