cocoa-touch

iPhone Serialization problem

Hi, I need to save my own created class to file, I found on the internet, that good approach is to use NSKeyedArchiver and NSKeyedUnarchiver My class definition looks like this: @interface Game : NSObject <NSCoding> { NSMutableString *strCompleteWord; NSMutableString *strWordToGuess; NSMutableArray *arGuessedLetters; /...

MKMapView loading all annotation views at once (including those that are outside the current rect)

Has anyone else run into this problem? Here's the code: - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(WWMapAnnotation *)annotation { // Only return an Annotation view for the placemarks. Ignore for the current location--the iPhone SDK will place a blue ball there. NSLog(@"Request for annotation view"); if ([...

How to push a view into an existing table cell?

I've got a nice table populated with data, with custom-designed cell layouts. Currently, tapping a cell will push in a new view (for more information, say), which works fine. What I'd like to do, though, is have the new view push into the cell's bounds, not fill up the whole screen. Can't seem to wrap my brain around how to accomplish t...

How to put cells into certain sections in a grouped table?

I've got a class of object with a category property (task.category), which is set to an integer value (1, 2, or 3). I'd like to have a grouped table build itself by putting each task into the right section... How do I get certain cell objects to be drawn in certain sections of a grouped table, based on one of their properties? Thanks! ...

Can't get UISearchBar to display unless inside a table view

My goal is to have a UISearchBar fixed in a view right above a UITableView. When I set this up in IB and then build, the table view expands to fill the whole window and the search bar is not visible. If I make the UISearchBar a subview of the UITableView, the search bar displays as expected, but this is not what I want. What I'm afte...

Cocoa Touch: When does an NSFetchedResultsController become necessary to manage a Core Data fetch?

I'm developing an iPhone application that makes heavy use of Core Data, primarily for its database-like features (such as the ability to set a sort order or predicate on fetch requests). I'm presenting all the data I fetch in various UITableViewControllers. What I'd like to know is a rough idea of how many objects I can fetch before it ...

UITableView section index

I have a view which displays a UITableView with a section index along the right side. This was working perfectly when the controller class was a UITableViewController, e.g. in the .h file I had @interface MyClass : UITableViewController However, I wanted to make the table view have an image background. I changed the xib file so it h...

Objective C: How do I make an NSMutableSet of NSMutableDictionaries, and have them be unique based on one of the dictionary values?

The reason I'm asking this is because right now I use an NSMutableSet of integers and a corresponding NSMutableArray to store the rest of the data, but I think I'm not using the language right. Here's my code: In the init function: self.markerList = [[NSMutableArray alloc] init]; self.markerIdSet = [[NSMutableSet alloc] init]; And t...

What's the difference between using CGFloat and float?

I tend to use CGFloat all over the place, but I wonder if I get a senseless "performance hit" with this. CGFloat seems to be something "heavier" than float, right? At which points should I use CGFloat, and what makes really the difference? ...

dyld error: image not found

Hi everyone, I got this error message while running my application on simulator. Dyld Error Message: Library not loaded: /System/Library/Frameworks/UIKit.framework/UIKit Referenced from: /Users/thomasschober/Excuse Me/build/Distribution-iphonesimulator/Excuse Me.app/Excuse Me Reason: image not found I am not able to ...

Iphone application crashes when poping to rootController of UITabBar tab

Hello, I'm having this bug I can't figure out and it is making my head hurt. So, basically, in my iphone application I have UITabBar with some tabs each having UINavigationControllers inside. Something like this: someViewController *someController = [[someViewController alloc] myInit]; UINavigationController *someNav = [[UINav...

Why doesn't UITableViewCell selection not draw if I tap very quickly?

I have a a UITableView with cells that are partially custom using addSubview. I am using a different cell ID for the last cell, whose purpose is to load more data from a server which will make new cells appear. (Think the "Load more messages from server" cell in Mail.app) E.g. - (UITableViewCell *)tableView:(UITableView *)tableView cel...

Where to place the "Core Data Stack" in a Cocoa/Cocoa Touch application

In the iPhone Core Data Template, Apple places the Core Data Stack in the App Delegate. My initial inclination however is to move this code into it's own class whose responsibility is to handle the management of the Core Data Stack. Do you typically encapsulate this functionality within its own class or do you leave it in the App Deleg...

iPhone: previewing photos

Hi, I am creating a photo preview application - it has some photos in it. When I had not a big amount of images, everything was fine. The app uses UIScrollView to switch between images, basing on the PageControl code example. But now I added more pictures and I have some trouble with it - it consumes too much memory and my app starts g...

UIImagePickerView Controller - image path - iphone

UIImagePickerView Controller returns NSData of image, My requirement is to store the path of an image as a varchar data type. After selecting an image from UIImagePickerView, how can I obtain the complete path of the selected image of Photo Gallery of iPhone? My application won't have to worry about storing images within my applicatio...

IPhone SDK: Adding a UIActivityIndicatorView to a UITableViewCell

Why doesn't the cell show anything in this code: UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; [cell.imageView addSubview:spinner]; [spinner startAnimating]; cell.textLabel.text=@"Carregando..."; [spinner release]; I'm doing this inside tableView:c...

How to save an image that is returned by UIImagePickerView Controller

I have an application, in which the user will select an image from a UIImagePickerView. After selecting an image from it, I want to save it in my application. How can this be achieved? Thanks in advance for helping me. ...

Can you override a parent UIView's alpha value on one of its subviews?

I have a somewhat transparent view (alpha = 0.6) that has some subviews. I'd like one of the subviews (a UILabel) to be drawn with alpha of 1.0 because the blending makes the text difficult to read but by adding it as a subview of the main view it has adopted its parent's alpha value. Is there a way to override this behavior? I believe I...

Does AnimationDidStop have an animationDidStart counterpart for implicit animations?

I am doing an implicit animation, and the following function gets called when it's done: - (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context; Is there a similar function that will get called when an implicit animation begins? ...

UISlider alpha issue

Hi! I'm want to figure out such an issue: I have a UIView dervied class in which there are several controls. Some of them must appear and disappear depending on selected mode. This is made by means of setting aplha value to respected component. All controls adds procedurally through code in initWithFrame in normal way. All controls wo...