int b = 1; /* while loop execution */ while(b<=25) { if(b==5 || b==10 || b==21) { int a = 1; while( a ...
Read More
Core Data
#import @interface ViewController : UIViewController @property (strong, nonatomic) IBOutlet UITextField *nameTF; @property (strong, n...
Read More
Local Notifications
1) Add the following to the AppDelegate.m -(void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotif...
Read More
create button in UINavigationController
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleDone target:nil action:n...
Read More
UINavigationBar button create
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Make Payment" style:UIBarButtonItemStyleDone target:nil a...
Read More
shopping app show the cart value in badge using NKNumberBadgeView
import NKNumberBadgeView from github add below lines // Initialize NKNumberBadgeView... MKNumberBadgeView *number = [[MKNumberBadgeView ...
Read More
button in UITableViewCell class to call method on main UIViewController
you can assign a method from your controller to a button from UITableView in your - (UITableViewCell *)tableView:(UITableView *)tableView c...
Read More
add numbers from array
How get the total sum of NSNumber's from a NSArray? int sum = 0; for (NSNumber * n in ad.pQuantity) { sum += [n intValue]; } NSL...
Read More
textfield value increase or decrease by clicking button
- (IBAction)productLessClicked:(id)sender { if ([self.productTF.text isEqualToString:@"0"]) { }else{ NSInteger count = self.p...
Read More
get array contains object
[yourArray containsObject:@"object"];
Read More
replace object at index
[ad.pQuantity replaceObjectAtIndex:i withObject:productQuantity];
Read More
remove object index from array
[ad.pName removeObjectAtIndex:ind];
Read More
get object index from array
NSInteger ind=[ad.pName indexOfObject:productName];
Read More
QR COde Reader
add AVFoundation.framework UIKit Framework View.h: @property (strong, nonatomic) IBOutlet UIView *mainV; @property (strong, nonatomic...
Read More
does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64 or bitcode enable yes/no
does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendo...
Read More
Error:“The sandbox is not in sync with the Podfile.lock…” after installing RestKit with cocoapods
up vote 186 down vote accepted I was able to fix that by updating CocoaPods. I. Project Cleanup In the project navigator, select yo...
Read More
Stop Zoom in and zoom out in mapView
self.mapView.zoomEnabled = false; self.mapView.scrollEnabled = false; self.mapView.userInteractionEnabled = false;
Read More
NSTimer: timer start and stop
NSTimer * myTimer = [NSTimer scheduledTimerWithTimeInterval:110.0 target:self selector:@selector(targetMethod:) userInfo:nil repeats:YE...
Read More
This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release
[[NSOperationQueue mainQueue] addOperationWithBlock:^{ _placeL.text=[placeArray objectAtIndex:i]; //_timeL.text=[timeArray objectAtIndex...
Read More
Alert controller title color change
UIAlertController* alert = [UIAlertController alertControllerWithTitle:ad.cellText message:nil preferredStyle:UIAlertControllerStyleActionS...
Read More
Zoom in and Zoom out
- (IBAction)btnZoomInPressed { MKCoordinateRegion region; MKCoordinateSpan span; region.center.latitude = lati; region.center.longitud...
Read More
Subscribe to:
Posts (Atom)