iphone

Passing NSMutableArray into a function

Hi, I have this problem with Cocoa, I am calling a function and passing an Array to it: Some where I call the function: [self processLabels:labels]; And the function is as follow: - (void)processLabels:(NSMutableArray*)labs{ labs = [[NSMutableArray alloc] init]; [labs addObject:@"Random"]; .... } When debugging, I notice...

Is there a library that can do raster to vector conversion, for the iPhone?

I am trying to take an image and extract hand written text so that it can be read easily and zoomed in on. I would like to convert the text to vector paths. I am not aware of any libraries that would make this as painless as possible. Any help is greatly appreciated. Examples are nice too :) ...

Pros and cons of MPMoviePlayerController versus launching UIWebView to stream movie

I have a client who has video content for the web in Flash format. My task is to help them show the videos in an iPhone app. I realize that step one is to get these videos into the appropriate Quicktime format for the iPhone. Then I'm going to have to help the client figure out how or where to host these files. If that's tricky I assum...

Multi-colored UILabel text

Is is possible to create multi-colored text within a UILabel? I.e, if my text was: "The quick brown fox" have the q and b in blue with the rest of the text in black? I get the feeling I'd have to use a UIWebView and render the text in HTML to accomplish this. Thoughts? ...

UITextField - capture return button event

Hi, How can I detect when a user pressed "return" keyboard button while editing UITextField? I need to do this in order to dismiss keyboard when user pressed the "return" button. Thanks. ...

Change text of "return" keyboard button

Hi, How can I change the standard text of "return" button to something else? I want it to be "add" Thanks. ...

Change color of magnifying glass

Hi, The color of a magnifying glass is being taken automatically from the background color of UITextView. Under the text view I have an image and the text view background itself is opaque. So in this case the magnifying glass is white even though the picture under UITextView is yellow. Is it possible to override the color of magnifying...

Conditional application launch view

My app is driven by a UITabBarController embedded with a UINavigationController for each individual view within each active tab. When the app is launched the first time, I'd like to present a separate settings view without a visible TabBar. After the user has completed the setup, they'd be taken to the main view with the TabBar. Also, o...

iPhone: Saving data onto a movie

I know I could show text ontop of a movie using MPMoviePlayerController. Can I actually persist text, say the player's name to the movie and save it. I know Core video is not available on the iPhone. Are there any approaches to doing this? i ...

Get a UITableView to not scroll and grow within a UIScrollView

I need to create a screen that is similar to the one below. The only way I can come up with is to have a UIScrollView be the parent view. Then have a UIImageView and UILabels for the thumbnail and main text ("All3Sports"). For the sections like the phone numbers and home page, I thought I could have a UITableView and have it simply no...

How do I send XML as the email body from a native iPhone app?

I am writing an app that ultimately wants to send some XML via email. I have the mailto/URL thing sussed, thanks to various links on the interweb, including Brandon and Simon Maddox. So I can send emails with the xml formatted using square brackets ([ ]), rather than the usual angle brackets (< >). But when I send angle brackets, with...

How fix "blank" area when navigationBarHidden = NO

Hi, I'm rotating a view similar to tje iTunes app. In portrait is a tableview and in landscape is photo viewver. When I return from landscape to portrait I try to recover the navigationbar but instead get a distorted tableview, and no navigation bar. This is what I do: - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)...

How far can you go using subclassing in objective-c?

In an iPhone app, I need to customize the look of a UINavigationController class. For instance, make the bar and font size bigger. My client really needs that, and bigger buttons aswell. So, instead of writing the class from scratch, I decided to subclass UINavigationController. My question is, can I customize any method or attribute's ...

pi in Objective C

I keep getting error in my iPhone programing when I try to use pi. I'm trying float pNumber = 100*cos(2 * pi * (days/23)); But i get errors that say: _pi, referenced from _pi$non_lazy_ptr I saw somewhere on the internet to use M_PI and it compiles but I don't think it gives me the correct calculation. When I try: float p...

Default dataset for Core Data based iPhone application

I am writing an iPhone 3.0 application that uses Core Data to persist the model. I'd like the application to be installed with a default dataset. When developing for iPhone < 3.0 I used an SQL script to initialize a database prior to running a build and then deployed the prepared .sqlite file as an application resource. What's the best a...

Syntax error trying to use CGRect

I'm trying to add a subview to a tableview cell and of course using CGRect as part of that. However, I get a syntax error on build: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWi...

How do I look at an object in Xcode's debugger?

I have a simple question about debugging on Xcode and GDB. I often run into an error: unrecognized selector sent to instance 0x1081ad0 which makes the program load into GDB. Is there an easy way to examine what instance is located in that memory from GDB? ...

Where do I place Data Layer in iPhone App

In .Net I usually create a separate class library and reference it in my project. This class library does all the select, insert and updates to the database. Or, I put classes or static methods in the App_Code folder. In iPhone Dev, where do I put this data layer in order to have a separation in code and logic. This layer, files, would...

Repeating events on a gregorian calendar in Cocoa Touch

How would I set up a gregorian calendar in cocoa touch and set an event that will repeat every X days? Thanks ...

How to trigger MKAnnotationView's callout view without touching the pin?

I'm working on a MKMapView with the usual colored pin as the location points. I would like to be able to have the callout displayed without touching the pin. How should I do that? Calling "setSelected:YES" on the annotationview did nothing. I'm thinking of simulate a touch on the pin but I'm not sure how to go about it. ...