iphone

iphone large NSArray of strings performance woes

I have an Iphone app with a large, nested NSArray of strings. The NSArray goes 3 levels deep, and there are a total of approximately 15,000 strings at the deepest levels. The vast majority of the strings have fewer than 20 characters. Every so often, my app hangs for a while, then resumes working after 5-25 seconds or so. This is obv...

Hiding UIAlertView Opened in Another Function (iPhone SDK)

I am using the solution posted in this thread: http://stackoverflow.com/questions/1832459/how-to-show-a-alert-when-user-click-on-use-button-after-shooting-a-picture-using However, that gave an error on the following line that "saveImage" was undeclared. saveImage = [[UIAlertView alloc] initWithTitle:@"Sa... So I changed the code to r...

Trying to remove Super ViewController but stuck in View?

Hello all, I have 3 ViewControllers 1.Main 2.Gallery 3.Text. What my problem is that i have the GalleryViewController using an External UIView with the name GalleryItemView. So once the view controller calls this inside the UIView i have a button that changes the subview so what i do is use the [super addSubView:newView]; eveything work...

Share UIWebView between multiple views?

What I'm trying to do is transfer the contents of a UIWebView from one view controller to another. I could just copy the URL and reload the page, but that would take quite a bit of time. Is there any way I could copy the UIWebView instance and then render it on an entirely different view? (I've tried making the UIWebView object on the se...

Setting ViewController delegates in iPhone runtime

I am writing an iPhone application and needed to use the address book functionality. For this to work, it is necessary to specify a ABPeoplePickerNavigationControllerDelegate on the ViewController. The problem is that I am creating all fields and buttons dynamically runtime, and thus does not have any custom ViewController - using only ...

Custom UIView like iCal event "bubbles"

How would I go about creating a custom UIView that is like the event "bubbles" in iCal for iPhone? I would prefer to not use images, so that they could be in any color. Thanks! ...

How to define link text color in UIWebView

I have a short plain text string, which might contain a weblink. I load it into UIWebView using loadHTMLString and notice that e.g. font style and size are wrong. Can't find anything else, so I embed text inside ad hoc HTML document with CSS (is this REALLY the only way): NSString *myHtml = [NSString stringWithFormat: ...

Compilation error while compiling 2.1.2 code on 3.0 iphone SDK

When I'm trying to compile 2.1.2 SDK code on 3.0 or higher version, it gives a compilation error saying "CFXMLTreeRef undeclared identifier". Below is the code snippet where it shows the error: #ifdef TARGET_IPHONE_SIMULATOR #import <CoreServices/CoreServices.h> //cause of the preoblem #else #import <CFNetwork/CFNetwork.h> #endif I ...

save and load data (iphone sdk)

hi all i'm wondering what's the best method to save and load data in a iphone application. i'm trying to save strings into a text file or something like that and load them into a table view, so that the first entry in the text file is the first row in the table view and so on... somebody got an idea how I could realize that? thanks i...

how to delete the dynamic uibutton

Hello I have some codes to create dynamic button as below: - (void)viewDidLoad { for (int i = 0; i < 9; i++) for (int j = 0; j < 8; j++) { forControlEvents:UIControlEventTouchDown]; UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; button.frame = CGRectMake(10+i*...

UISegmentedControl deselect (make none of the segments selected)

Hi, in fact the title contains my question. I have a UISegmentedControl, and need to deselect currently selected tab. I tried: [menu setSelectedSegmentIndex:-1]; menu being the UBOutlet for uisegmentedcontrol but this gives me exception. anyone have some idea? thanks peter ...

How To Implement In Apps in my Application

Hi All, In iPhone i have created application now i want to put my application on iTune store i have my account on iPhone portal and on iTune now How i can put my application on iTune to implement this funcationality What i want to do. My Question, 1) To implement inApps i have to code in application? Which specifyed in this link...

Is there any way to automatically generate @property and @dynamic tags for Core Data primitive accessors?

Update: mogenerator works, with a template modification The Core Data documentation suggests using the -primitiveValue and -setPrimitiveValue: methods to access and change internal data of an NSManagedObject subclass rather than the slower and non-type-checked -primitiveValueForKey: and setPrimitiveValue:forKey:. I would like to adopt ...

Limiting number of selections to one cell/row per group in a grouped UITableView on iPhone...

Hi! I´m working on a quiz application which uses a grouped UITableView, where i need to limit the users selection to one cell per group and also make the group selectable only once per group, in order to stop the user from correcting any potential wrong answers. Is there any way of doing this? Cheers, Adam ...

Is it possible to implement iphone FBConnect without FBLoginButton ?

i use UIActionSheet to share something to faceook . every thing is good ! but still a problem . after user login on facebook -/////// logout and share buttons show bgreat but didn't work great ! it means if user tap Logout button , login window appears again ! why ? i think , its because of FBLoginButton , when remove this method my UIA...

Stop Images Disappearing when scrolling UITableView

I have a UI Table View Controller. Each Cell Loads an image from my webserver. If I scroll the TableView so that a particular cell scrolls out of view and then scroll back again the image for that cell has vanished and I have to wait for it to reload. I'm guessing this is some performance/ memory management thing build into iphone? How...

How to send actions to targets other than File's Owner?

Hi, Newbie here, I am trying to send actions from button touches to a controller other than the one acting as File's Owner. I have four distinct areas of the screen that I would like managed by four separate controllers (buttonController, toolbarController, textController and graphicController) with a fifth controller (mainController) co...

How to Instantiate and Call UIView Subclasses Without Using a Nib

Without using Interface builder or xib files, what is the correct way to instantiate two classes which inherit from UIView such that they can switch between themselves using UIButtons located on the views themselves? I think this involves setting up a UIViewController from the app delegate and adding two instances of my classes which im...

NSXMLParser Error code:5, iphone

When i try to parse an xml using nsxmlparser, this error code is showing up, what is this error code pointing to ...

What's the ANT version in iPhone 3Gs and how can I access it?

I want to build up an ANT network (e.g. see wikipedia article ) and develop sport accessories using the iPhone 3Gs with integrated ANT Controller (used by Apple for Nike+iPod devices) to communicate with them. I need to know which ANT version the controller is (ANT or ANT+), what it's able to do (receiver/transeiver) and how I can acces ...