iphone

NSOperation and fwrite (Iphone)

Hi, I am having problem with this code.Basically I want to execute the fwrite from a timer function asyncronusly. Here is the code block in my Timer function. (This will call by the timer every 0.2 seconds. -(void)timerFunction { WriteFileOperation * operation = [WriteFileOperation writeFileWithBuffer:pFile buffer:readb...

check if value is an integer (Objective-C)

Hi, How do I check if my value is a integer or not? I want something like this: if ( i/split != int ) {...} Thanks, ...

[iPhone] Disabling Anti-Aliasing for fonts

Hi, I'm writing a retro type game for the iPhone, and need to render a pixel style font to the screen. However, it looks nice and sharp when I run it in the simulator, but not when I run it on the device. Is there any way that I can disable Anti-Aliasing for fonts? I have already tried this: CGContextRef c = UIGraphicsGetCurrentContext(...

SilverLight and iPhone

I need to embed an silverlight or flash component in an iphone native application. Can anyone tell me the compatibility for both in an iphone application. ...

Changing the .ipa file artwork of compiled iPhone application

Hello ! Everyone. Just do following steps & you will understand what problem I am facing right now. Create a new project from template. File / New Project - Navigation based application. Create any 32 x 32 image (.png) from any image editor & name it as icon.png Drag that file to your applications resources. Compile & run your project...

Problems extracting information from RSS feed description field

Hi, I've built an iPhone application using the parsing code from the TopSongs sample iPhone application. I've hit a problem though - the feed I'm trying to parse data from doesn't have a separate field for every piece of information (i.e. if it was for a feed about dogs, all the information such as dog type, dog age and dog price is con...

iphone assign image to viewcontroller problem

Hi i am retrieving image to my second view using URL,problem is i cannot able to assign the image to the UIImageView object this code working fine NSData imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://dblog.com.au/wp-content/galah.jpg"]]; UIImage animalImage = [[UIImage alloc] initWithData:imageData]; problem...

Zoom on userLocation

Hello, how can I zoom the map on my userLocation automatically in my app? I have the following code to zomm in the map but i must zoom on the userLocation and the following code zooms always to africa? MKCoordinateRegion zoomIn = mapView.region; zoomIn.span.latitudeDelta *= 0.2; zoomIn.span.longitudeDelta *= 0.2; zoomIn.cen...

Terminating app due to uncaught exception 'NSInvalidArgumentException', in iPhone programming

hello, i've the following code for button creation and on action of button , i'm calling buildUI method CGRect cgRct = CGRectMake(10 ,30 ,400, 320); //define size and position of view subMainView_G_obj = [[UIView alloc] initWithFrame:cgRct]; //initilize the view subMainView_G_obj.autoresizesSubviews = YES; //set view property ov ...

Do there any dev who wrote iPhone wifi/bluetooth multiplay before?

Hi there, do there any dev who wrote iPhone wifi/bluetooth multiplay before? Recently, I'm trying to make my latest game Doodle Kart to have mulityplay via bluetooth. But I found that there are hugh data need to share between the 2 devices. -your car's position and direction -your car's status(it is in normal state, it is hitting by bu...

iPhone Text Field>Format Input String as a Credit Card Number As They Type

How can I format a users text field input as they type and insert a "-" or " " on every 5th character. 4500000000000000 becomes 4500 0000 0000 0000 ...

Build Errors when installing openfeint 2.4.4 SDK

I have 12 build errors when trying to install the openFeint SDK. Build Invisible_Pong of project rocket_pong with configuration Debug Ld "build/Debug-iphonesimulator/Invisible Pong.app/Invisible Pong" normal i386 cd /Users/robkwok/Documents/rocket_pong setenv MACOSX_DEPLOYMENT_TARGET 10.5 setenv PATH "/Developer/Platforms/iPhoneSimul...

What's an efficient way of calculating the nearest point?

I have objects with location data stored in Core Data, I would like to be able to fetch and display just the nearest point to the current location. I'm aware there are formulas which will calculate the distance from current lat/long to a stored lat/long, but I'm curious about the best way to perform this for a set of 1000+ points stored...

Google iPhone app status bar animation how did they do it?

I was playing with the Google App for iPhone and when i viewed a website the title of the page appeared over the classic status bar with a nice fade-in animation, after 4-5 seconds the title view disappeared with a nice fade-out animation. How did they do that? did they hide the status bar with [[UIApplication sharedApplication] setSta...

scollview frame differs from the content size.

Hi, i am implementing page control functionality. i have taken a scroll view and multiplied its width with the number of pages. it works fine but the size of the srcollview is bigger than i frame i had set. That is why i am able to scroll veritcally as well. i have disabled vertical scrolling. i even tried the following code. Please hel...

how can I translate a NSString to NSData? And the data has the same content as the string

NSString * theString=@"e88d"; NSData * data; // something I should implement NSLog(@"%@", theString); NSLog(@"%@",[data description]); I want the results of the two printings are the same. AES encryption and decryption: (1).The server: if the plaintext is :@"abcd"; the AES encrypted data(NSData data type) is :"d882830c dc892...

IPhone - Show Wait Indicator

Hi. What I try to do: If a user is pressing a button, a new view controller is being loaded and pushed to the navigation Controller. The new view controller is doing some hard database querying in it's ViedDidLoad Method which causes some seconds to get the view loaded. I'm trying to show a wait indicator before the view is starting t...

Core data select objects from an array - iPhone

Hi everyone, I was wondering if I could select objects based on a predicate with an array... for example Code: [NSPredicate predicateWithFormat:@"id=%@", arrayOfID]; Will it work? If no, how can I do it? Best ...

Multiple view controllers on screen at once?

Hello! I am trying to wrap my head around controllers in Cocoa Touch. The main problem is that I would like to have more then one controller “on screen” at once – I want to have a large view (with controller A) composed of smaller views controlled by their own controllers (say B). I’d like to have it this way because the division makes t...

Bad Access while reading ABAddressBookCopyArrayOfAllPeople

HI all, When I tried to read the record of all peoples from the device as follows: NSArray* allPersons = (NSArray*)ABAddressBookCopyArrayOfAllPeople(addressBook); I am getting a bad access. When I tried the same code in the simulator its working . Stack trace as follows: #0 0x322aafa8 in sqlite3_backup_init #1 0x322cb248 in sqlit...