iphone

NSString's stringByAppendingPathComponent: removes a '/' in http://

I've been modifying some code to work between Mac OS X and iPhone OS. I came across some code that was using NSURL's URLByAppendingPathComponent: (added in 10.6), which as some may know, isn't available in the iPhone SDK. My solution to make this code work between OS's is to use NSString *urlString = [myURL absoluteString]; urlString ...

Iphone Link Static Library

Hi All, I have created a static library in XCode called TestLib. I then created a simple test project that will use this library. I dragged the TestLib xcode project into my test project (frameworks section - if it matters), and set TestLib as a direct dependency of the test project. I am having trouble importing header files from the ...

XML Processing on iPhone: What is the best option?

Hello Im building a new version of an iPhone application and Im wondering if I should review how my app communicates with the server. My iPhone client sends and receives XML over HTTP requests. To send the information I use ASIHTTPRequest framework. I "manually" build the XML request by appending strings. To parse the response Im usin...

iPhone OS: How do I create an NSDate for a specific date?

Seems like a simple thing but I can't seem to find a way to do it. It would be great to see a couple different methods. Thanks, Nick ...

Possible to play a sound without stopping music?

I use AVFoundation framework to play sound. If music is playing when I play a sound, the music stops. Is there a way of avoiding that? ...

mailto: link in UIWebView - Does Not work

Is the areanything special you need in html or Callbacks in a UIWebView to handle anchor tags with an href, or is there something special about an anchor tag with a mailto link in the href? ...

can we change/access the exposure information of an iphone camera?

I know this question has been asked, but tat was 2 years ago. Hopefully apple has not kept the camera on a tight leash till now. :P can we manipulate these values, are we even allowed to read/view these values?? :( ...

iPhone: Newbie memory management question

I am just getting started with cocoa. So please excuse the silly question, but I can't quite wrap my head around some aspects of memory management yet. In the interface of my class I am declaring an object as CEMyObjectclass *myObject;. I do not alloc or init the obect in the classe's init menthod. But I do have a method that calls myOb...

is it possible to request UIWebView using user agent as Safari on iPhone?

i try to request on my application via this url http://reader.mac.com/mobile/v1/http%3A%2F%2Ffeeds.feedburner.com%2F9To5Mac-MacAllDay and it also return that it available on iPhone only how can i fix it? mycode NSMutableURLRequest *urlRequest = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString: myurl]]; [urlRequest ...

UITextView change height instead of scroll

By default, the UITextView's contentView becomes scrollable when there is too much text to fit into the textview based on it's height. I'd like to disable this and instead, update the height of the UITextView to fit in the text. The reason I'm doing this is because I'm adding the UITextView as a subview of a UIScrollView which should ha...

Tab bar application with UINavigation Controller MOC not being retained.

I created a tab bar application from the template and added a navigation controller to one of the tabs. I have already created this app from the navigation app template already and is working. The reason I am doing it this way is because I need to add a tab bar and thought it would be easier starting by using the tab bar project template...

iPhone OS: Using an NSString variable to specify a property or ivar

I have a program that I want to either hide or show certain UIbuttons depending on certain variables and all the buttons are named incrementally like 'button1, button2, button3.' So I want to iterate through the buttons but I don't know how to address the button in an assignment statement using an nsstring as a variable inside a dot not...

How to make an custom button with an self-stretching image?

I slightly remember that there is an class which is capable of stretching an image in such a way, that the first x pixels and the last y pixels won't get stretched. For example if you have an button image with round corners, you would want those round corners to stay intact while the middle part of that image gets stretched. ...

Rotation of ViewController in TabbarController

I have a custom UIViewController in a UITabbarController and want to respond to rotation events. When a rotation occurs, the tabbarcontroller and the viewcontroller get rotated. However, the view in the viewcontroller doesn't get redrawn properly: the layout doesn't autoresize and it is black on parts of the screen. The strange thing i...

NSPredicate acting strange in NSFetchedResultsController

I feel as if this should be very simple, but it's behaving strangely. I have 3 entities, with a relationship as such Entity A <-->> Entity B <<--> Entity C I have an NSFetchedResults controller and I'm trying to filter the results of Entity A using the following predicate. [NSPredicate predicateWithFormat:@"NONE entityB.entityC == %@...

setConnection: unrecognised selector sent to instance

Hi guys, I've tranplanted this from another app of mine, but it seems not to be working in the current app: static NSString *testurl = @"http://google.com/"; NSURLRequest *URLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:testurl]]; self.Connection = [[[NSURLConnection alloc] initWithRequest:URLRequest delegat...

Changing color of alert views

How can I change the color of the alert view box from blue to black? Any one please help!! ...

Turning Separate iPad/iPhone Targets into Universal App

I, when I got my hands on the iPad SDK Beta, thought the universal binary would be to much work, so i opted for the separate targets. I realized halfway through making the iPad portion of my app, that making a universal application would be easy as pie. The issue is, I can't use Apple's option to convert my iPhone Target to Universal. Th...

Send parameters to a web service.

Before I start: I'm programming for Iphone, using objective C. I have already implemented a call to a web service function using NSURLRequest and NSURLConnection. The function then returns a XML with the info I need. The code is as follows: NSURL *url = [NSURL URLWithString:@"http://myWebService/function"]; NSMutableURLRequest theRequ...

unrecognized selector sent to instance

My app works fine in the simulator but when I run it on my phone I get this error: 2010-04-05 21:32:45.119 Top Banana[119:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[MethodViewController setReferringObject:]: unrecognized selector sent to instance 0x16e930' It happens here...