I have the following delegate method of NSURLConnection
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSLog(@"DONE, Receive bytes: %d", [webData length]);
NSString *theXML = [[NSString alloc]initWithBytes:[webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding];
//NSLog(theXML);
[theXML ...
When drawing strings using drawAtPoint:, drawInRect: and even setting the text property of UILabels - the text can sometimes appear slightly blurry.
I tend to use Helvetica in most places, and I notice that specific font sizes cause some level of blurriness to occur, both in the simulator and on the device.
For example:
UIFont *labelF...
If I have a UIPickerView with three components (dials). How does the picker handle two dials spinning simultaneously? For example, the user might flick the first dial, which spins freely and immediately slowly click to a selection on the second dial.
I'm doing the following in the picker. If one dial is spinning, I don't capture it...
In my app I am playing video(s) that are in the app, using the standard MPMoviePlayerController class.
The first time around around this works great, however after watching 1 video if you try and watch something else the app crashes on MPMoviePlayerController's play method with the error:
*** Terminating app due to uncaught exception '...
Hi
I need to get the user emails those are configured in iPhone using cocoa touch. How can i do that .
Thank you for answers .
...
I am working my way through the book "Beginning iPhone Development" and understand the basic view push concept. However Apple's iPhone UI design guide states that I should re-open my application at the previous app-exit view. How can I boot a NavigationController so that it defaults to a child view and yet has a view stack that returns t...
I have a question about sharing data between views, hopefully it's not too basic. I have an NSMutableArray in an appDelegate with say (Object1, Object2, Object3). When a new Object is created (and added to the array), I need to access that Object on the next view. Previously I was just passing the Object to the next view, but that got me...
I wanted to start a optimization thread.
I have ran into an interesting situation, I have an iPhone app with 3 UITableViews each displaying more or less the same data (you can say it's a matter of filering). To date I had 3 separate NIBs for this, each with it's own controller, additionaly the UITableViews were inside UINavigationContr...
I have a UITableView with two sections. It is a simple table view. I am using viewForHeaderInSection to create custom views for these headers. So far, so good.
The default scrolling behavior is that when a section is encountered, the section header stays anchored below the Nav bar, until the next section scrolls into view.
My questi...
Is it possible to have a red UIBarButtonItem?
...
I'm trying to convert a string of numbers, entered by the user, into a sexy string like Phone.app on the iPhone. Here is the code I'm using, which doesn't work (no special format comes out) and after a certain number of digits it just starts adding "0" to the end of the string.
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] i...
I am using CGImageCreateWithImageInRect() for generating a small image from a background image runtime, which is going to displayed for every thread call (0.01 sec). Once I start showing part of image through CGImageCreateWithImageInRect application starts consuming memory in very high rate and crashes within seconds. Memory consumed goe...
I am using Interface Builder to play around with some ideas. I never noticed that there is a "Simulate Interface" feature which apparently will render the nib in the iPhone simulator. So, I created a view, put one component in there (a Segmented Control), saved it, selected "Simulate Interface", the simulator launched but... nothing rend...
Need advice on how to debug this. I'm new with limited environments and have no previous embedded or smart phone programming experience so I could use some clues.
Already aware of:
Instruments, Clanger Static Analysis, manual code review, etc. Instruments seems to be very helpful in general but quite time consuming and freezes up a lot o...
This is a beginner level question in which I'm curious if this is a valid use of a pointer in a statement such as:
NSMutableDictionary *foo = [bar mutableCopy];
I get confused when that is valid versus when I'd need to do the following:
NSMutableDictionary *foo = [[NSMutableDictionary alloc] initWithCapacity:0];
foo = [bar mutableCo...
Hello all,
I'm using an UITextView to hold static content (in Chinese, which means that the characters are all fixed width). I want to let users click on a character in the text and bring up dictionary information for that character. I know all of the issues surrounding the lack of copy and paste and all that, but I'm hoping that there ...
I am trying to draw a background image in my UIView. This is in a UIAlertView delegate method alertView:
I pop the context because before this I was using a context in a OpenGL view called game.
UIGraphicsPopContext();
UIImage* background = [UIImage imageNamed:@"Background.png"];
[background drawAtPoint:CGPointMake(0.0, 0.0)];
// fade ...
My application is database driven. Each row contains the main content column I display in a UIWebView. Most of the rows (the content column) have a reference to image1 and some to image2. I convert these to base64 and add the image string into the row. However, if either image changes, it means I have to go back through all the rows ...
I'm having a small problem with request caching using NSURLConnection asynchronous connections on the iPhone. I don't know if I understood something incorrectly, or if Cocoa is doing the opposite to what it's supposed to do...
The documentation for NSURLRequest says that:
NSURLRequestReloadIgnoringLocalCacheData
Specifies that ...
I'd like a link in a UIWebView that plays a local .mp4 file. I know how to load the MPMoviePlayerControler but am not sure how to set it up in the UIWebView. I have a UIView with a UIWebView inside of it. How do I use the MPMoviePlayerControler with this setup?
...