iphone

How to capture video of iPhone game, in-game

Hi Folks, I want the users of my game to be able to record video of the game while playing it similar to the app Talking Tom Cat. I was wondering how to accomplish this. Do you have any ideas? I want both video and audio of the game to be recorded... Any clue would help :) Cheers! ...

How to call a grandparent method

Hi, i need to call a grandparent method of my class. @class Grandparent +--->@class Parent +---->@class Child Every class implement a method: -(void)foo If i want to call the parent method foo from child class i use: [super foo] If i want to call grandparent's foo, how can i do? It's not possible to call [super [super f...

UIWebView Xhmtl parse error but safari don't

Hi, I have an application showing standard html pages. I use UIWebView for html. When using safari for pages no problem. When I use uiwebview the page does not load. Error message(UIWebView) This page contains the following errors: error on line 230 at column 33: AttValue: " or ' expected Below is rendering of the page up to the firs...

Mapview lat lon co-ordinates - incompatible types in assignment

I have lat lon coordinates stored in a database table and I want to have them displayed in a mapview like this: region.center.latitude = place.lat; region.center.longitude = place.lon; the lat and lon are stored as doubles in the table. this is the error I'm getting: **error: incompatible types in assignment** I hope that's enough ...

How to enable swipe gesture for a UITextView

How do I enable the swipe gesture recognition for a UITextView? This is my code and the event attach to it is not firing. It works for taps just not for swipes. // Add swipe support for easy textview content clean up UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(eraseTextWithSw...

addSubview modifying the added view's frame

I'm not sure how to ask this question, but here goes... I am rendering a PDF page into a view and adding it to a UIViewController. Works fine, except for some PDF files. For some reason, the code goes through a different path for certain PDF files. It happens when the PDF is created from PowerPoint. After the addSubview call, it goes ...

Correctly debugging IPhone Apps on XCode

The line below has an error, can you see it with a naked eye? NSString *title = [sender titleForState:UIControlStateNormal]; NSString *newText = [[NSString alloc] initWithFormat:"%@ button pressed.", title]; When the Iphone simulator executes this line it crashes without any other information. I must be missing something about debuggi...

EXC_BAD_ACCESS when setting ivars directly (without using accessors) inside -init method, why?

I've spent about 10 hours trying to find this bug that was causing my app to crash, and it was in the last place I looked (well it would have been, but last place I ever expected it to be). Originally I thought I had memory management issues (unbalanced retain/release) because the crash would happen every time I sent -removeAllObjects t...

UITableViewCell with background image does not look good

Hi, I created my UITableViewCellStyleDefault styled cell and set its background image: cell.backgroundView = imgView; and it works but the background of the text in the cell is still white.So it hides partially the backgroundView. I have tried: cell.textLabel.backgroundColor = [UIColor clearColor]; cell.contentView.backgroundColor = ...

IPhone UIView - How should a UIViewController handle sizing of a UIView when its size is unknown in advance?

(IPhone newbie question) I've subclassed a UIViewController and a UIView, and created a InitWithFrame for the view. My custom controller uses this to initialize its view, by frame, in its loadView function. I plan to use the controller and view in my code at different places. At times under a navigation controller, toolbar, both, neit...

Preserve Cell Image After Scrolling UITableView

I have a custom UITableViewCell which acts as a check list. As the user clicks on the selected item, it goes from red to green indicating a selection, however as the users scrolls further down the list, once they come back up to the top, the image has changed back to it's default red value. How do I go about preserving the state of an ...

iPhone app 'fake' landscape mode

So after wasting many hours trying to get my app to run in landscape mode by defualt I'm looking for an alternative. My idea is to create the app in portrait mode but rotate everything by 90 degrees, the player thinks that he is playing the game in landscape mode (when really I've just rotated everything). I recognise it will be a litt...

Swear Filter in Objective-C: Needed for iPhone App

Need to filter our swear words that are inputted to the iPhone app and inserted to our database. I'd like to catch this before passing to our database. Currently, I was using: stringByReplacingOccurrencesOfString:@"swear" withString:@"" but this seems inefficient to list 20+ words that need to be filtered. What's the best way to app...

Where is Xcode's Build and Archive command looking for its iTunes artwork?

I just found out about the Build and Archive option, and it looks very nice. However, my application build with Build and Archive has a big question mark as its artwork in the Organizer window, instead of my nice iTunesArtwork file. I tried to have it in my project as PNG, JPG, with or without extension. I probably missed something sim...

convert an hex string to a NSData

How can I convert a string in hex format to retrieve from it an NSData and after that an UIImage inside of my iPhone app? I've got a string (str) that contains a value like X'FFD8FFE000104A46....01010000010001000'. That string is created from a xml file by the method: - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)st...

video only shows the first frame on iPad

I have an iPad application that allows a user to select between 5 different videos. However, three of these videos only display the first frame when selected. These videos were all made in iMovie, exported (shared) to iTunes, and added to the application bundle. These videos work fine both on the Mac AND on the iPad if I sync them throu...

UIModalPresentationFormSheet on iPhone

How can I make a Modal View's presentation style UIModalPresentationFormSheet (or something what looks like it) on an iPhone? Thanks in advance! ...

How do I close the AdBannerView full screen popup, when using a flip view transition?

I am performing a flip transition between two views and in the main viewcontroller that contains the two flipping views, I want to place an AdBannerView. I create the AdBannerView, and when I flip to the second view I want it to display. This is all working fine, I can click the advertisement and the full screen ad will display, but wh...

NSFilemanager one directory back ?

Hello , i want to know if there is a way to get the previous directory when working with NSFileManager... This can be probably done by appending '..' to the current directory ([[NSFileManager defaultManager] currentDirectoryPath] ) , but it's not a good idea at all :( Is there another effective way to do this ? ...

How to Use Java in IPhone Applications

We can create Java application using XCode. [ Both console applications and Applets ]. In window menu click Organizer. Then in the bottom of the Organizer window click new from template (Click (+) Symbol). Then click Java template and then select Type of java application. and then write code and create java applications in MAC using xc...