iphone

How to "PERFORM" or call something, repeatedly?

If I have something I want to do repeatedly in an Xcode iPhone app, how do I set it up and call it? For example, if I wanted to do this simple line lots of times from lots of different places in an app: label1.text = @"Hello"; And then what if I wanted to call or perform it from lots of different apps: how would I convert it into my o...

unable to use three20 iphone library

Hello, Well I am a newbie, developing an app. I want to use library 320 to display a set of thumbnails generated from a specific image directory . When user clicks on an image a particular action shold take place. Unable to understand how to implement this library due to poor documentation. Can any body suggest me a better tutorial or...

Adding logo for iPhone app

Hi, I want to add a logo view as iPhone application lunch. I code as follows - (void)applicationDidFinishLaunching:(UIApplication *)application { UIImage image = [[UIImage alloc] imageWithContentsOfFile:@"1.jpg"]; UIImageView view = [[UIImageView alloc] initWithImage:image]; [window addSubViews:view]; [NSThr...

LGPLv3 or LGPLv2.1 and the iPhone

This is a legal question as much as a programming question. I am a programmer and it is about a program. Am I legally allowed to alter a LGPLv3 program to work on an iPhone? I have heard it might be a conflict because LGPLv3 bans Tivoizing(locking hardware to block modification in the LGPL license). If I found the software in LGPLv2 ...

Unable to set/get iPhone headset mic volume

Unable to set/get headset mic volumeHi. I am using the following method to retrieve the Mic volume, but AudioHardwareServiceHasProperty is failing. I realized that my mic has one input channel than the master. But the property, kAudioHardwareServiceDeviceProperty_VirtualMasterVolume documentation says irrespective of the way the volume ...

Creating the Phone App's in-call view in iPhone

Hello guys, I'm trying to create this sort of "pop up action sheet" view similar to the in-call view in iPhone's phone app. I believe this is a custom view, since I can't seem to find this in any apple references. But somehow the Google app and Discover app both have this view and look awfully similar (I've attached the images below). ...

iPhone Core Data application will terminate save database required?

Hello, I have an application that allows you to edit some percentages, however it will only let you commit those changes if the percentages add up to 100. However because the Core Data template includes the save code in the application will terminate. If the user changed something and then exited the application, the item would be of co...

Refreshing XML data and updating a UITableView

I'm developing an iPhone application which uses a TableView to display XML data. The XML data comes from an external resource and is parsed and put into an object for use as a table dataSource. The application uses a UITabBar and multiple ViewControllers all programmatically created and using the same dataSource. Everything is fine and ...

fire back button in UINavigationcontroller with code.

Hey guys, How is it possible to get one level up in my navigationcontroller? The docs didn't help me. [self.navigationController popToRootViewControllerAnimated:YES]; pops to the root(as it says). [self.navigationController dismissModalViewControllerAnimated:YES]; didn't work either. Thanks for any help! ...

Unit testing and TDD, OCUnit vs Google Tool Box.

Hi, I'm trying to choose between OCUnit and Google Tool Box, do you have any preferences, would recommend one or the other, why ? I would be very interested to hear about your experiences with any of the 2. The main problem i have with both of them is the managment of crashes in tested methods (ex: BAD ACCESS) None of them was able to ...

Iphone and php application

I created php pages.. those php pages are registration form.with the fields.FirstName,LastName and CompanyName...If I fill the information in that form and hit submit the data will store it on the mysql database.And I created one page...that displays the data which I have added through register form...I have a button on this page which d...

what version of safari is the iphone os using? (as of 12/14/2009)

What version of Safari is on the iphone now? Is it Safari 4? Safari 3? 2? Something in between? In other words, when I'm writing code for the iphone, which version of Safari for the pc/mac will be the most accurate version to test it with? I think I've already run into a case where the canvas tag is handled differently on the iphon...

How can I multiply an image against the alpha of another image in Cocoa?

Having loaded two different images I want to do the following operation and obtain image3. image1.red * image2.alpha = image3.red image1.green * image2.alpha = image3.green image1.blue * image2.alpha = image3.blue I wrote the code in the link below for Android and was basically looking for the same functionality in Objective-C/Cocoa. ...

iphone SDK: MKPlacemark AdministrativeArea question

I'm using the MKPlacemark Class to populate a label with location specifics. When calling the AdministrativeArea property, the entire name of the US State is returned(ie West Virginia). Is there a way to return ONLY the initials(ie WV)? Thanks. ...

Captured UIView image has distorted colors (iPhone SDK)

Hi all, I'm using the UIGraphicsGetImageFromCurrentImageContext() function to capture the screen contents into an UIImage object (previously rendered into an Image context). This works great for both the simulator and a real device, however in the latter the resulting image has a few pixels with distorted colors, as seen here: Please...

How do I handle a Complex Multi-Touch Sequence?

The example code "Handling a Complex Multi-Touch Sequence" in the Event Handling section of the iPhone Application Programming Guide provides an incomplete example that assumes the reader knows enough fill-in the blanks. I know enough to know that I don't know enough to do that without some clarification. In Listing 3-6, I assume touchB...

CoreData, many-to-many relationships and NSPredicate

I have a CoreData datamodel that includes a many-to-many relationship. As it turns out NSPredicate does not support many-to-many relationships. From CoreData.pdf: "You can only have one to-many element in a keypath in a predicate." As a Recipe example: Many recipes and many ingredients. Many recipes have the ingredient "salt" and "sa...

UIPageControl tap to "swipe" ?

What method to I use to make my UIScrollView update when the sides of a UIPageControl are tapped? When swiping the UIScrollView, the UIPageControl is updated correctly, but if I tap the sides of the UIPageControl to go to the next page, only the dots update, but the UIScrollView won't swipe. I've looked in the docs and am unable to find ...

Running php application on cocoa

I want to run the php application on Cocoa-Xcode.How would I run my php application on XCODE? ...

Rounded rect with Gradient color

I have not really done much programming with Core Graphics. And I tend to stick with QuartzCore now that it does a lot of what I need through the layer property :) However, I have a UIView, which is currently gradient. I'd like to add rounded corners to this UIView and the layer property does not do this when I draw the gradient: - (vo...