Tag: ipad

Passing array between view controllers?

I really need some more help! I am trying to pass an array from one view controller to another. I think the latter being a ‘child’ view controller? My code is as follows: MainViewController.h: #import <UIKit/UIKit.h> #import <AudioToolbox/AudioToolbox.h> #import <AVFoundation/AVFoundation.h> @interface HelloWorldIOS4ViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate, AVAudioPlayerDelegate> { NSMutableArray *countProductCode; UIPopoverController *detailViewPopover; } @property […]

Validate phone number ios

I need to validate an international phone number. I know its difficult to validate an international phone number, so I’m going to keep it simple: + or 00 then 6-14 numbers My current code using a regex isn’t working for some reason which I can’t work out. It just says that it cannot open the […]

How to add done button on keyboard on top of keyboard in IOS?

I want to add the Done button on the top of keyboard on right side in iOS for a textView.Please tell me how can i do that? enter image description here I want to achieve something similar to above keyboard

iOS : Load image from plist file

I am trying to show various images from a plist file into UIImageView , I wrote my code like this : NSDictionary *picturesDictionary = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@”Photos” ofType:@”plist”]]; imageArray = [picturesDictionary objectForKey:@”PhotosArray”]; PhotosInAlbum.image = [UIImage imageWithContentsOfFile:[imageArray objectAtIndex:1]]; But actually nothing happens, and my ImageView is empty ! also I have two buttons to forward […]

iOS calculate text height in tableView cell

i’m currently developing on an app, which displays some tweets in a tableview. On the storyboard i created a prototype-cell, which includes the basic gui concept of a tweet entry. It looks circa like this: ++++++++++++++ ++Username++++ ++++++++++++++ ++Tweet+++++++ ++++++++++++++ ++Time-Ago++++ ++++++++++++++ Now i’m calculating the height of the cell with the following code, but […]

iOS 7: Proper iPad icons for iPhone app?

We have an app for iPhone only, but often users install it on their iPads. With iOS7 and the asset groups, it no longer respects our new iPad icon image sizes (76px and 152px). If we don’t use asset groups and have our old icons (72px), it will load them, but they clearly look scaled. […]

CGAffineTransformMakeRotation counter clockwise always

I an trying to animate a UIImageView to rotate counter clockwise when a user touches it and moves its finger on it in clockwise direction. Basically I want the UIImageView to go back to its original position once the touch ends and it should move in counter clockwise direction. The problem I have is that […]

How do you set the tab order in iOS?

Is there a way (either in IB or code) to set the tab order between text fields in a view? Note that I’m not talking about the next form field after the return (or “Next”) button is pressed — many bluetooth keyboards have a tab key, which seems to cycle through the fields in completely […]

Using UIPinchGestureRecognizer to scale uiviews in single direction

I would like to know how we can use UIPinchGestureRecognizer to scale UIView in single (x or y) directions alone. Say, if the user moves his two fingers in a pinch gesture only in a single direction (horizontal), only the width of the uiview should increase/decrease and if the fingers are moved only vertically, the […]

iOS Develoment: Why is my NSURLConnection failing with a “bad URL” error for only some users?

I have an iOS app that requests JSON data from my Rails 3 app, hosted on Heroku, and it works great on my device and for many other users, except one. I have one user who has told me that my app fails to retrieve the JSON data, so I had her send me some […]