[Solved] Invalid Operands to binary expression (NSNumber* __strong and NSNumber*) [closed]

You can’t perform addition on NSnumber for this NSNumber * totaldur =[NSNumber numberWithInteger:20]; totaldur = [NSNumber numberWithInteger:([number1 integerValue] + [[dict valueForKey:@”tracktime”] integerValue])]; //// first of all convert both numbers to same data type like (nsinteger,int,float) and then apply addition on them and in the end save sum in nsnumber object Hope it helps 2 solved … Read more

[Solved] Custom circle progress view [closed]

Take white circle image like you displayed in above image and try following code. – (void)startSpin { if (!animating) { animating = YES; [self spinWithOptions: UIViewAnimationOptionCurveEaseIn]; } } – (void)spinWithOptions:(UIViewAnimationOptions) options { [UIView animateWithDuration: 1.0f delay: 0.0f options: options animations: ^{ imgViewCircle.transform = CGAffineTransformRotate(imgViewCircle.transform, M_PI / 2); } completion: ^(BOOL finished) { if (finished) { … Read more

[Solved] A UIImage created in coregraphics isn’t repeating

I don’t know what the context is that you’re passing in, but whatever it is, you shouldn’t be drawing into it. And you aren’t drawing anything into the context that you made with UIGraphicsBeginImageContextWithOptions. If you want to generate an image, you don’t need to pass in a context, just use the one that UIGraphicsBeginImageContextWithOptions … Read more

[Solved] Expected ‘:’ Lexical or Preprocessor error

It looks like you are missing a colon, a couple of dots, and a couple of semicolons: [self.ScrollView setScrollEnabled:YES]; // ^ ^ ^ [self.ScrollView setContentSize:CGSizeMake(320, 900)]; // ^ ^ You need to watch out for these small elements of the syntax – Objective C does not tolerate deviations. The worst part about syntax errors is … Read more

[Solved] JSON request using objc [closed]

Look for link to the API documentation in the footer of the website. If there is none, probably they don’t offer any kind of public API. You can also try to contact the website owner and ask him. 1 solved JSON request using objc [closed]

[Solved] How can i fetch value from Json response in Objective -C

Try this… NSError *error; Array1 = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error]; for(int i=0;i<[Array1 count];i++) { NSDictionary *dict1 = [Array1 objectAtIndex:i]; ATArray =[dict1 valueForKey:@”AT”]; DIdArray =[dict1 valueForKey:@”DId”]; DOArray =[dict1 valueForKey:@”DO”]; PLIdArray =[dict1 valueForKey:@”PLId”]; etc… Array2=[dict1 valueForKey:@”PdCatList”]; for(int i=0;i<[Array2 count];i++) { NSDictionary *dict2 = [Array2 objectAtIndex:i]; PLIdArray =[dict2 valueForKey:@”PLId”]; PPCIdArray =[dict2 valueForKey:@”PPCId”]; etc… Array3=[dict2 valueForKey:@”pdList”]; for(int i=0;i<[Array3 count];i++) … Read more

[Solved] How to hide keyboard on touch UITableView in iOS Obj-C

This is the simplest way to dismiss keyboard – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard)]; [tableView addGestureRecognizer:gestureRecognizer]; } – (void)hideKeyboard { [self.view endEditing:YES]; } 0 solved How to hide keyboard on touch UITableView in iOS Obj-C

[Solved] How to create action sheet Delete in IOS [closed]

Simply use that code make make delete button as destructiveButton UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@”Are you sure you want to delete this backup?” delegate:self cancelButtonTitle:@”Cancel” destructiveButtonTitle:@”Delete Backup” otherButtonTitles:nil,nil]; actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque; [actionSheet showInView:self.view]; 1 solved How to create action sheet Delete in IOS [closed]

[Solved] Objective C Send Color to Method [closed]

Method should be something like this, -(void)setColor : (UIColor *)myColor{ myView.backgroundColor = myColor; someView.layer.borderColor = myColor.CGColor //etc } Call this method like, [sel setColor : [UIColor redColor]]; //or whatever color you want to set Hope this will help. 🙂 8 solved Objective C Send Color to Method [closed]

[Solved] Objective C: split text between brackets

You can solve this problem using a regular expression and NSRegularExpression. Construct a pattern which matches the text between brackets. For example the pattern @”\\[([^]]*)]” matches an opening bracket \\[ – the backslash is required to treat the bracket as a literal character, zero or more characters except a closing bracket [^]]*, groups that text … Read more