iphone

CGImage (or UIImage) from a CALayer

Hi all, I have created a CALayer (I added several shapes to the layer, but ultimately, I have a single CALayer), and I am having a LOT of trouble adding it to a CGImage. I have found some references to [CALayer renderInContext:ctx], but I am not sure how to implement it. Has anyone done this before? Cheers, Brett ...

Alert views in portrait, iPad in landscape, and unable to rotate to anything but "other" landscape (180 degrees).

Update: Solved. See fix at bottom. In my iPad app which supports all orientations, if the app is loaded in landscape, weird things happen: Alert views appear in portrait, even though the rest is in landscape Rotating the iPad from landscape to portrait does not trigger a rotation (nor does it trigger any of the shouldAutorotate style ...

equaling indexPathForRow with UItextField

Hi , i am trying to implement something that user can insert an number then program show me the row number but i little bit confusing , i would be grateful if you help me , here is my code : for(int i = 0; i < myTextField.text; i++) { [myScrollTable selectRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0 ] animated:YES scrollPos...

Encoding problem with ASIHttpRequest

Hi, I have an encoding problem with ASIHttpRequest. When I get an URL, the data is returned perfectly except for a little encoding problem. This is my code: - (void)fetchGamesForCategory { NSString *url_string = [[NSString alloc] initWithFormat:url_match, theCategory._id]; NSURL *url = [NSURL URLWithString:url_string]; A...

Getting started with a VOIP app for iOS or Android?

I'd like to create an app for iOS that does VOIP, presumably by interacting with a website. I can start with Android too. Does anyone know of any tutorials, suggestions or libraries that would be of any use. (The app would need to be rewritten for BB and android eventually, too.) EDIT: Bonus: What is SIP? ...

determine if point on screen is within specific UIScrollView subview

A UIScrollView contains several UIView objects; how can I tell if a point on the screen not generated by touches is within a specific subview of the scrollview? so far atempts to determine if the point is in the subview always return the first subview in the subviews array of the parent scrollview, ie the coordinates are relative to the ...

Facebook iOS SDK - log in without promting user

Hey! I am making an app to read news articles from a website on the iPhone. I would like to be able to share these articles on Facebook, using a password and email-address that was set somewhere programmatically (not using Facebook-Connect, mostly because I want the design to be the same, whether you log in to Twitter from the app or in...

Moving a UIImageView on an arc using CGAffine.

I understand that CGAffineTransformMakeRotation can rotate an image, and CGAffineTransformMakeTranslation translates an image. I also understand CGAffineTransformConcat can merge two transformations. However, I cannot seem to figure out a way to move an image on an arc using both of these. I understand this is more a mathematical questio...

strange error iPhone/iPad

Hello stack overflow, So I have a table view that contains a bunch of data. The user can navigate down, browse edit, etc. However when they edit and delete a row, and then navigate back via the nav controller, sometimes (not all the time) the app crashes throwing this error: -[CALayer resourceType]: unrecognized selector sent to inst...

rotate uiview using touch (ipad and iphone)

Hi guys.. I am trying to design another app and am struggling to think of the best way to do it. I'm after some advice please! If you imaging a bicycle wheel in the middle of the ipad (and iPhone)... I want the user to be able to click on the tyre and spin it to the left or right. Depending on the speed of the swish will drive the speed...

How to store data into an xml file on my website and extract the data out of it in my iphone app.

In my application i need to create and save data into an xml file on my webspace and then i want to parse that xml into my iphone app. The question here is this is being done by two different parties a sender and a receiver. But i don;t know how to parse that xml file into my app when i don't have the excat url of that xml because there...

Quartz 2D Experts -- Masking method crashes program after 6 or 7 consecutive calls

Hi all, I'm looking for a Quartz 2D expert that might be able to see a flaw in the following code: self.imageView.image = [self maskView:self.imageView withMask:[self createMaskForTool:self.toolView modifyForOutline:NO]]; - (UIImage *)maskView:(UIView *)view withMask:(UIImage *)maskImage { UIGraphicsBeginImageContext(view.bound...

iphone sdk: Adding data to sqlite database not working !?

hi, i use the code below to insert data into my sqlite-database but for some reason the application always crashes as soon as the method gets called and the problem seems to be the "sqlite3_open" statement. Does anyone have any idea what i might be doing wrong? - (void)viewDidLoad { [super viewDidLoad]; self.title = @"Animals"; animals...

While-Loop works but not the if statement?

I have this while loop in xcode. The loop seems to work fine since I printed my i++ in console. But for some reason it only checks my IF statement the first time around. I can only add one title into the MutableArray called sectionZeroTitleArray. I have many arrays in this loop so it might get confusing. I will try my best to explain. ...

Random Sprite Destinations

Hello again, I was able to make the targets spawn randomly along the top of the screen and dissappear at the bottom of the screen. The only problem is that the targets only move to one fixed point every time. I want them to move to a random point on the bottom of the screen. Any ideas? Thanks. Here is the code: -(void)addTarget { ...

Set background color in table view while using Core Graphics to add vertical lines for grid

Hi All, I'm attempting to create a grid-style table using the UITableView by overwriting vertical lines on top of the standard horizontal lines provided by default in a UITableView. I am adapting my code to the example helpfully provided from this blog: http://www.iphonedevx.com/?p=153. First, the code which draws the vertical lines (sa...

Error while calling a phone number from iPhone app

Hi, I am using following code to make a phone call from my iPhone app: NSURL *myPhone1 = [NSURL URLWithString:@"14165551212"]; [myPhone1 scheme:@"tel://"]; NSURLRequest *myPhoneReq = [[NSURLRequest alloc ] requestWithURL:myPhone1]; NSURLConnection *myCon = [[NSURLConnection alloc] initWithRequest:myPhoneReq delegate:self]; but getting...

Install application without developer certificate?

I am willing to jailbreak my device, but not sure what to do after that. Dev program application will take too long for a demo I hope to do on hardware tomorrow. Thanks! EDITED: It doesn't need to be 4.1 on an iphone4 ...

custom behaviour to iphone addressbook ui controller

is there any way to customize the ABPeoplePickerNavigationController and let user select multiple contacts without going into details? I can push contacts into an array as user selects them but there's no way to give visual feedback back to user that he/she selected the contacts he clicked (or unselect them on second click). I don't wan...

How to implement NTLM Authentication for UIWebView?

I have a use case where a UIWebView may need to connect with a web server secured with NTLM. I also have a use case where I already have the credentials to be passed. So instead of forcing the user to enter them, how do I perform the handshake with the UIWebView? UPDATE: Using this method here works well enough when you are doing sim...