iphone

Write/Save file to iPhone

Hello all, I am currently saving images to the iphone's local space whenever I finish loading them. I was wondering if I need a separate thread to do that. I.e The iphone can be requesting multiple images at the same time and when they are loaded, I call the save to HD method. Since there are a lot of save to HD method being called a...

Memory alloc issues, crash on device iOS SDK 4.1(Thread 0 crash)

I have two problems 1) My App works fine on the device the first few times its run. Then it crashes after the First screen pops up(Tab BAr). If i connect the device to my MAC and then run the device app it works(not debug mode). I Checked the crash Logs, it crashed cos of "EXC_BAD_ACCESS (SIGSEGV)" and Thread0 crashed.The error was N...

Move image from left to right and right to left in iphone..

- (void)moveImage:(UIImageView *)image duration:(NSTimeInterval)duration curve:(int)curve x:(CGFloat)x y:(CGFloat)y { // Setup the animation [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:duration]; [UIView setAnimationCurve:curve]; [UIView setAnimationBeginsFromCurrentState:YES]; ...

Button icons: round close icon

I've seen other apps are using a round icon for closing a view. The only similar icon I found is UIBarButtonSystemItemStop. But this presents only a rotated cross with a border (as always with buttons) around it. I rather would like have something like a UIButtonTypeInfoLight. If this button is used, no border is visible. Also the icon ...

How to prevent pin gesture in MPMoviePlayerViewController ?

As MPMoviePlayerViewController supports pin gesture ( two fingers move apart ) to make the movie player full screen, is there any method to remove this gesture? Because if I use the gesture, the movie is still playing without the video. I think the view of movie controller is removed from super view. I am thinking of overriding touchesB...

Is it reasonable to consider a future Retina / HD iPad when starting a new project?

A few days ago a client asked me if the transition to the iPhone 4s retina display was a difficult one, development-wise. This made me ask myself whether I should have considered iPhones with high resolution dispays even before the iPhone 4 had been announced - creating artwork with higher resolution, preparing codepaths... (while, of c...

iphone/ipad large canvas vs small canvas + div animation

Since I dont have either of these devices handy to test, which method would be faster on an iphone/ipad? One large canvas (overlayed over a bg of the same size), that is cleared, and has new pixel data drawn to it each frame, at a certain position or A small canvas that updates each frame, contained in a div that is animated across a ...

Objective-c AES encryption doesn't look like java AES encryption

Hi all Well im trying to encrypt an string in objective c extending NSData with this method: @implementation NSData (AES128) (NSData *)AES128Encrypt { char keyPtr[kCCKeySizeAES128] = {'\xe1','\xaa','\x9c','\x61','\x46','\x74','\x44','\x56','\xf0','\xe5','\x47','\x46','\x86','\xdc','\x95','\x77'}; NSUInteger dataLength = [self leng...

Custom Design in IPhone Applications.

I want to create the following design to my IPhone application. I dont know any idea about this. If anybody knows any idea, please help me. Thanks. ...

Facebook for iPhone, background wall post

Hi, I am implementing the Facebook iOS SDK into my app... and find no problems with that. BUT, what I can't find to figure out is how to send basic wall post to my facebook app wall. What I want to do is whenever a user searches for something, the app sends a wall-post with the following text "@someUser just searched for someSearchQuer...

Add key to plist Dictionary in xcode

Hi there. i have been working on plist these days and got stuck in adding a key to plist which has a boolean value. Here is my plist structure. Root (Dictionary) +- Parent1 (Dictionary) - Key1 (Boolean) - Key2 (Boolean) - Key3 (Boolean) +- Parent2 (Dictionary) - Key1 (Boolean) - Key2 (Boolean) Suppose now i want to ad...

How to replace variables in an html file which is feeded to an UIWebView?

In my app, I want to replace some variables inside an html file when it goes to an UIWebView. The file is local. For example, I add a variable $userName$ and then I would replace that with @"John". Would I have to read the file in as string, and then perform some string replacement action? ...

Is it possible to distribute a populated keychain with an application

I am working on an application that uses a private web service. We currently use a bundled client certificate to enable 2-way SSL connectivity however the password for the certificate is in the code and it is a concern that this could be de-compiled and used with the (trivially)extracted certificate file for nefarious purposes. Is ther...

How to determine if a string is a URL in Objective-C

I'm new to iPhone development and Objective-C. Using the ZBar SDK I've developed a basic app which scans a QR image from the photo album and outputs what it translates to. I want to know if there is a way to take this output, determine whether it is a URL and if so open it in a web browser. Thanks Zac ...

Array giving EXC_BAD_ACCESS in for loop

I have a C array defined in my method as: int c = 4; int r = 5; keysArray[c][r]; I have this for loop, which works, populating the keysArray as expected. for (int row = 0; row < r; row++) { for (int column = 0; column < c; column++){ keysArray[column][row] = [anotherArray objectAtIndex:0]; NSLog(@"array1 %@",keysA...

Lua: require() not working on iPhone

Hi guys, I am working on a shooting game on iPhone and I need lua for scripting levels, enemies, and etc. So I wrote a bullet script like this: -- circular_bullet.lua local time_between_bullets = 0.2; ... function InitializeCircularBullet(objectName) ... end and an enemy script: -- level1_D2.lua require("circular_bullet.lua"); ....

How to load an local HTML file as string into UIWebView?

I'd like to use UIWebView's - (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL but I'm not sure what this baseURL is good for or how I would create that. My file is called localHTMLfile.html and I know how I would load this file the normal way: NSURL *url = [[NSBundle mainBundle] URLForResource:@"localHTMLfile" withExte...

Best way of using web services on iOS?

I'd like to build an iOS app which lets you log in to a web service. After that, the app would (when the user chooses) send the login name/pass, together with the requested variable(s), over https. For instance after requesting 'news-update', it would receive the requested info in XML format... something like: <news-update> <title>K...

How do I create an application that works on both the Windows 7 Phone and IPhone?

It is clear that Mono Touch is part of the solution as it allows C# code to run on the IPhone, however Mono Touch wraps the IPhone API so does not provide a common API. Another option would be a jave-script toolkit that work on both and provided on-line data storage. However what real life experience do people have? ...

Date is getting changed while converting to NSDate from NSString.

Hi all, I am converting NSString to NSDate with help of NSDateFormatter. Now code works fine here in all OS with device & simulator but it is creating different Output at UK, USA region. Here is the code that I am using. NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"...