cocoa-touch

HTML String content for UILabel and TextView

Hi out there: i got an object with contents of html markup in it, for example: string = @"<p>This is wonderful</p> <p>Also some &#8216; entidies &#8217; <p>"; so i want first to convert this entidies in for my label text. the second step would be to convert my p tags to line breaks. the third step to convert my "img" tags to uiima...

How can an iPhone communicate with a computer?

How do apps like Apple's "Remote" app control mac applications and send data? is this via php with exec() commands or some other method? and how would I do it in c? Also, how fast is this rate of transfer (can I use it to send real-time data like streaming video or audio?) thanks to anyone who cares to enlighten me on this issue :-) ...

Stop Returning Cached CLLocationManager Location

Hi Everyone: I am wondering if there is some way to make it so CLLocationManager doesn't automatically returned a cached location. I understand that the documents say "The location service returns an initial location as quickly as possible, returning cached information when available" but this cached location could be extremely far awa...

Correct way to access an NSMutableArray between two UIViewControllers ?

Design question: I have ViewController A which contains an NSMutableArray*. The ViewController A is responsible for displaying the user a Map, when the user interacts with this map, the view controller A fills the NSMutableArray* with Coordinate Objects. The information contained in the NSMutableArray* should be later displayed in a ...

Activity indicator (spinner) with UIActivityIndicatorView

I have a tableView that loads an XML feed as follows: - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; if ([stories count] == 0) { NSString *path = @"http://myurl.com/file.xml"; [self parseXMLFileAtURL:path]; } } I'd like to have the spinner to show on the top bar at the app launch an...

push multiple views from TableView to Tableview

Hi Out there, my app looks like this UINavigationController with UITableViewcontroller as RootViewController. feedsTableViewController = [[ablogFeedsTableViewController alloc] initWithStyle:UITableViewStylePlain]; feedsNavigationController = [[UINavigationController alloc] initWithRootViewController:feedsTableViewController]; feedsNav...

Should I put my UITabBarController outside the App Delegate?

Hi guys, I followed an example from "Beginning iPhone 3 Development" which puts the code for the main view controller, a Tab Bar, in the delegate method. Is this the correct place to put this or should it be in a separate .h and .m file? All my subviews are in separate files so I'm wondering if I should have my tab bar view controller ...

CGContextSetShadow produces no results

I'm using this code in my UIView subclass to draw a circle with a gradient fill: - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetShadow (context, CGSizeMake(4,4), 5); CGContextBeginPath (context); CGContextAddEllipseInRect(context, CGRectMake(self.bounds.origin.x, self.bo...

what is the different between "view" and "window" on iPhone?

I use the Xcode and add a UI elements on that, but there have different XIB that I can choose from. there are application XIB, view XIB, and window XIB. I want the user tap, and go to the next screen. I don't know which UI element is suitable for my "next screen", I means, whether I choose the View XIB or a Window XIB? ...

UINavigationItem with prompt and activity indicator

I'm wondering how Apple implemented the UINavigationItem that contains an activity indicator (see attached image below), above the title. Is this Apple's private API that allows to do that? If not, how can it be reproduced in an application. http://img218.imageshack.us/img218/8819/img0133g.png Thanks! ...

Annimation in iphone inside for loop not working

Hello friends, I am currently developing an application in iphone, i want to animate some images on screen and for the same i have written this code for (int i = 1 ; i <= 5 ; i++) { imgview.image = [UIImage imageNamed: [NSString stringWithFormat:@"spleshScreen%d.png", 1]]; NSLog(@"i = %d" , i); [UIView beginAnimations:nil context:...

Problem with uploading multipart data to server

Hi, I am trying to upload multipart data to my server which has image data along with the fields specified in the following form <form action="/imageUploader" enctype="multipart/form-data" method="post"> <p> Title:<br> <input type="text" name="title" size="30"> <input name="action" type="hidden" value="uploadtile" /> <input name="can...

Cache URL images iphone UITableview

Hi, I'm seeking a tutorial on how to cache images loaded from a url into cells of a uitableview. I found an example here http://www.ericd.net/2009/05/iphone-caching-images-in-memory.html#top But the code is incomplete. I'm an objective c novice so I found it very difficult to fill in the missing pieces. ...

large scrollable "something" with TTStyledText in it

Hi, im searching for a solution of the following problem: i got a "larger" XHTML string that i want to display in an area that is scrollable. I already used TTStyledTextLabel for a small text-caption and it works pretty well. But now i want display it more like a UITextView that scrolls or a UIScrollView with my TTStyled Content in it...

Picker, setting startup / default row?

Does anyone know a way that I can set my picker to default / startup with row values that are not right at the start of my datasource? If possible I would like the picker to start with a middle value so I don't get the blank white area at the top. EDIT_001 Added the following lines to viewDidLoad, which seems to be the best place to ...

How to truncate an NSString based on the graphical width?

In UILabel there's functionality to truncate labels using different truncation techniques (UILineBreakMode). In NSString UIKit Additions there is a similar functionality for drawing strings. However, I found no way to access the actual truncated string. Is there any other way to get a truncated string based on the (graphical) width for ...

Help with NSFetchedResultsController

Please help with this issue of using NSFetchedResultsController. I created an object of NSFetchedResultsController and I use it once in the method: tableView:cellForRowAtIndexPath: and when I try to execute the same code in the method tableView:didSelectRowAtIndexPath: I get EXC_BAD_ACCESS. Here is the code of the 2 methods - (UITable...

How do I call a method from an imported class in Objective C?

Hi all, I have some code which fetches an XML file from a URL and then parses it using NSXMLParser. Currently this code is contained within the viewController which calls it. I would like, for re-usability sake, to move the parsing code to an external class and call it from the viewController. I tried to achieve this as follows: Crea...

IPhone: Creating a Facebook like UI, Skinning Apps, Not following the AHIG

How do you design a UI like Facebook? Is it hard to implement a custom skin into a iphone app? How is it done? Do I need to follow apple's guideline? What if I don't want to? ...

Setting background image of custom table view cells

Hi, I've tried numerous ways of setting the background image of an unselected table cell, but without success: 1- In IB setting the image field 2- cell.contentView.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"list.png"]]; 3- cell.imageView.image = [UIImage imageNamed:@"list_selected.png"]; All seem t...