[Solved] how to pass data b/w two view controllers? [duplicate]

In story Board you can send value one view to another view like Bellow way. Your Implement method did Wrong. in you Second view-controller you need to define NSString with property and sythsize it. .h class @property (nonatomic, strong) NSString *YourString; .m Class @synthesize YourString; Now you can use it like:- -(IBAction)youMethod:(id)sender { [self performSegueWithIdentifier:@”secondview” … Read more

[Solved] Generating public key from modulus and exponent [duplicate]

As written by zaph in this answer, the following code should do what you want : NSData* bytesFromHexString(NSString * aString) { NSString *theString = [[aString componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] componentsJoinedByString:nil]; NSMutableData* data = [NSMutableData data]; int idx; for (idx = 0; idx+2 <= theString.length; idx+=2) { NSRange range = NSMakeRange(idx, 2); NSString* hexStr = [theString substringWithRange:range]; NSScanner* … Read more

[Solved] How can I place two images within a UINavigationBar? [closed]

One way to do this is to use UINavigationItem.titleView and UINavigationItem.rightBarButtonItem. Like this : viewController.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@”yourimage.png”]]; UIBarButtonItem * item = [[UIBarButtonItem alloc] initWithCustomView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@”yourimage2.jpg”]]]; viewController.navigationItem.rightBarButtonItem = item; Here I am using UIImageView as custom view, but it can be UIButton with custom image. Check this: How to add image … Read more

[Solved] How to get index of array element in cell? [closed]

Sorry if I’m understanding your English incorrectly, but I guess this is along the lines of what you want: You can get the indexPath of the row that was selected in a table by implementing tableView:didSelectRowAtIndexPath: in you tableView’s delegate (presumably your tableViewController). An indexPath has two properties you’ll be interested in; section and row. … Read more

[Solved] Different ViewController if different selectedSegmentIndex

First wire a segue for each viewController. control-drag from the viewController icon at the top of ViewControllerA to another ViewController and select the segue type. Click on the segue arrow between the viewControllers, and set its identifier in the Attributes Inspector on the right. Repeat steps 1 and 2 for each ViewControllerB, ViewControllerC and ViewControllerD … Read more

[Solved] iOS Charts, wavy lines

Please check this : let ds1 = LineChartDataSet(values: yse1, label: “Hello”) ds1.colors = [NSUIColor.red] ds1.drawCirclesEnabled = false ds1.drawValuesEnabled = false ds1.mode = .cubicBezier // add this line data.addDataSet(ds1) let ds2 = LineChartDataSet(values: yse2, label: “World”) ds2.colors = [NSUIColor.blue] ds2.drawCirclesEnabled = false ds2.drawValuesEnabled = false ds2.mode = .cubicBezier // add this line data.addDataSet(ds2) solved iOS Charts, … Read more

[Solved] Parse JSON with Objective-C

its because timeslots is under “Sunday, August 10, 2014” this dictionary. Its second layer. First retrieve “Sunday, August 10, 2014” dictionary then you will be able to access timeslot array. Modify your for loop like below for (NSDictionary *oneDay in data) { NSDictionary *dData = [oneDay objectForKey:@”Sunday, August 10, 2014″]; NSDictionary *tslots = [dData objectForKey:@”timeslots”]; … Read more

[Solved] How can I resize the UIImage to specific size

Here’s how you can resize the image while preserving its aspect ratio. The code below is from a category for UIImage: + (UIImage*)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize { float heightToWidthRatio = image.size.height / image.size.width; float scaleFactor = 1; if(heightToWidthRatio > 0) { scaleFactor = newSize.height / image.size.height; } else { scaleFactor = newSize.width / image.size.width; } CGSize … Read more

[Solved] Unrecognized selector sent to instance NSArrayM [closed]

Did you removed UITabBarController also from your .xib file in Interface Builder? Did you removed UITabBarController also from your .xib file in Interface Builder? Check if object – in your case NSDictionary is kind of it’s class and key is not null. For example: – (void)fetchedDataAlerta:(NSData *)responseData { NSError* error; NSLog(@”RESP register %@”, responseData); if(responseData … Read more