iphone

How do you activate multisampling in OpenGL ES on the iPhone?

I'm experimenting w/ improving the "resolution" of an OpenGL ES based app. Apple mentions here (developer.apple.com) that OpenGL ES in iOS 4 supports multisampling... and this can improve the graphics somewhat. How do you enable multisampling? ...

extract parameter from UIWebView NSURLRequest

I have an url " http://www.website.com/?id=123&val1=abc&val2=x " I would like to get the value for the parameters such as "id" and "val2" how do I do that? ...

iPhone -- working with complex numbers

I'm trying to figure out the best way to put complex numbers into my math-oriented iPhone app. I've found the mac osx manual page for complex numbers, which looks like a reasonable start. Three questions: (1) Is this the best starting point? (2) I will need an object-oriented wrapper -- can NSValue do this somehow? Or should I just...

UIKit controls for a sudoku grid?

I've recently completed an algorithmic sudoku solver in C, one in which three different approaches are taken to solve the puzzle. It was a piece of code I wrote for a Project Euler solution. Quite a bit of fun, I might add... Anywho, so I'm really interested in getting this little solver into an iPhone app. I really am at a loss for wha...

My subclass as a property won't accept new values for its properties

I have a UIViewController that presents another UIViewController with a picker and returns four values. I also have a custom class called Chemical that can hold these values. In the delegate method that receives the values (the didSelectSource one in AdjustViewController) I put a breakpoint and I can see that the proper values come bac...

Memory leak on keyboard dismiss

I have a view controller showing UITextField. Here I bring keyboard - (void)viewDidAppear:(BOOL)animated { [wordTextField becomeFirstResponder]; } Then I have button which is dismissing the keyboard without closing controller itself: - (void)cancel:(id)sender { if([wordTextField isFirstResponder]) { [wordTextField...

iPhone Objective-C: Disable the popping of the stack when clicking the tab with a navigation controller

Let's say I have a Tab Bar Controller with a tab A. A has a navigation controller, which lets me push new views onto the stack. Right now, if I tap A on the Tab Bar, all of the elements in A's stack will pop. Is there a nice way to disable this? I have a sequence of views that are displayed with the navigation controller that takes use...

Hi-Res @2x image not being picked up for tab bar item

I have a TabBarController that sets the image for the tab like so, in the -init method: self.tabBarItem.image = [UIImage imageNamed:@"tabImage.png"]; I have a [email protected] file in the resource. In the iPhone 4 simulator or the phone, the hi-res image isn't being picked up - the low res version is simply being scaled up. Any ideas w...

UITextView scrolling madness

We have an app that is using a UITextView to display a running log by appending text to it. Programmatically, we scroll it to the end after inserting text. That works fine. The problem is once it has a bunch of text, the user can't scroll the view up and down unless the view is touched in the margin. If the touch is over text, it won't...

Convert Image to B&W problem CGContext - iPhone Dev

Hello, I am using a method to convert images taken with the camera into black and white. The problem I'm running into is that if the picture is taken in Portrait mode, it rotates and stretches in the next view. But, if is taken in landscape it is just find. I can only duplicate this bug when I convert the image to Black And White. Here...

How to get ID3 tags for media files on iPhone

Hello. I need some help. The situation looks like this: I can get list of media files (mp3s, m4as, m4vs an so on) with link to the file (looks like: http://10.0.1.1/Media/Files%20Folder/File%20Itself.m4v So I get an array consisting of links to these files. I need to display these items in UITableView with corresponding tags (Genre, ...

Assiging base class pointer to derived class in objective c

I have a base class called ModelBase and I have a derived class called "Person". Now in the init method of person, I have something like -(Person*) init { if(self = [super init]) return self; return nil; } However, Objective C complains that Incompatible Objective-C types initializing 'struct ModelBase *', expecte...

Image in bundle not found using NSBundle

Hey internets! So here's the deal: I have an image in the Resources folder of custom framework that I use as a default for classes in the framework. However, when I create these classes in projects that link against my framework they fail saying they can't find the image. I'm guessing the NSBundle's +mainBundle does not search the cor...

How to retrieve the First Name and Last Name from the AddressBook?

Hi, everyone, I want to ask about the address book framework on iPhone application. I have import the framework and .h in my class. However, I don't know how to retrieve all of the First name and last name in the address book and store it in the NSMutableArray. what is the problems in my code? Thank you very much. NSArray *displayedIt...

When i kill the application in multitasking bar,and run the program it's goes to same state where i was closing the app

hi, Today i updated my 3GS i-phone to install my application to see it's functioning well in OS4,when i'm running the application and tap the home button it's goes to multitasking bar,then again i get the application from there it's goes to previous state where i was.i think the behavior is OK. but problem comes when i kill the applicat...

UIButton remove all target-actions

I have added multiple target-action-forControlEvents: to a UIButton. I'd like to remove all of these in one go without deallocating anything. I will then set new targets. Is this possible and how do I go about it? ...

iPhone UI design help

How can I learn how to design a good iPhone interface, beyond the few docs provided by Apple. Also, what the best way of testing the interface especially when the application is original? ...

How to access delegate returned parameters outside of the delegate method?

I've got a UIViewController with a UIPicker on it and I've got the - (void)sourcePickerViewController:(SourcePickerViewController *)controller etc... which returns several bits of data (the etc...) to it's delegate. Inside the delegate method, I see the values I want and can output them via NSLog but I can't figure out how to use them e...

iAd error how to resolve it?

i add iAd into UIVIew at buttom of TableView, it also error when fast scroll up/down. Code - (void)viewDidLoad { //NSLog(@"viewDidLoad"); if(NSClassFromString(@"ADBannerView") != nil) { ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectMake(0,0,0,0)]; adView.currentContentSizeIdentifier = ADBanner...

How i should upload live stream video from iphone to server???

I have one application where i need to upload live streaming videos from iphone to server how it is possible ???? ...