cocoa-touch

UISlider and REAL Time

I'm trying to use a UISlider to act as a Time limit. Problem is that the values go to .99 before flipping to 1. My code so far is int _min = (int)mySlider.value; NSLog(@"Slider Int Minutes %i",_min); NSString *str = [NSString stringWithFormat:@"%.02f",mySlider.value]; int stringLength = [str length]; NSRange range = NSMakeRange(0, s...

What's are the differences between @dynamic and @synthesize?

From the docs I was reading that @dynamic creates the accessor methods at runtime, while @synthesize will create the accessors at build time. So let me guess: @dynamic saves some memory and code is kept smaller in memory pages? or what? and what other differences are there between these? Would it be ok to say: "It's always a good idea ...

Drawing a text along a path in QuartzCore

Say I have an array of points that form a line and a text. How can I go about drawing the text along this line in - (void)drawRect:(CGRect)rect of a UIView? I am able to draw the path without a problem. Is there a standard method that I overlooked or a framework that would allow me to draw the text along that path? Ideally I woul...

UISearchBar Table Section Index Titles Overlap

How do I change the width of the UISearchBar when it is inside a table header so that the section index doesn't overlap the textfield? I want to recreate the same layout you find in the contacts view of the phone app. ...

Cant set two NSStrings into one UITextView

Hi, I want to get NSString * test1 = @"one"; NSString * test2 = @"two"; to my UITextView. I wrote this: uitextview.text = (@"%@, %@",test1, test2 ); but the UITextView only gets the second NSString... Why? ...

Wrap Text in UITextField?

Does anyone know how to wrap text in a UITextField? I am using Cocoa/Objective-C in Xcode for my iPhone project, and I can not seem to find a way to do this... ...

TTScrollView with nested UIScrollView

I want to have two pages displayed: One contains an image, this should not be scrolable as the image fits the screen nicely. The second is a longer text which has to be scrolled vertically. I tried the classical approach of a big UIScrollView where I just change the offset of the x-value, yet this leaves me with the issue that the image ...

Swap iphone resources in SVN working copies

We have a development environment with a lot of different settings for our sandbox instances, staging servers, and production environment. In our iphone code, we keep these settings organized in plists. Anyone have references to best practices for managing the swapping out of plists based on the current environment? Without having to ...

iPhone: add an image to grouped uitableview section header?

I know I can change the way the section header looks by implementing viewForHeaderInSection: The thing is I want to add a UIImageView to the right of the header text without modifying the look of the already existing label. I can create my own view and add a UILabel and a UIImageView, but then, I'd have to setup the label color and fo...

Need help understanding how IB-created UIViews are added programmatically

I am in a situation where one of my ViewControllers has many special cases and I need an elegant way of handling them. The general idea is that the bottom half of my View is identical in each case. The top half changes for each case. In accordance to DRY, I want to avoid make copies of my ViewController for each special case and changi...

How to share a ManagedObjectContext when using UITabBarController

I have an iPhone application that has a MainWindow.xib holding a UITabBarController, which in turn has a UINavigationController and a custom UIViewController subclass in its ViewControllers array. The root view controller for the UINavigationController and the custom view controller are both loaded from other xib files. The app uses cor...

How to get Apples buggy "Locations" example to work?

Unfortunately, Apple did not test it's tutorial at all. The "Locations" demo is really buggy and the edit Button does not even exist. I have no typo. First I didn't do copy & paste, and after that, I also attempted to just copy&paste their stuff. A lot of relevant code is completely missing. They simply do this in view did load, without...

Can I show/hide a certain cell in an UITableView depending on the state of another cell?

I have a UITableView with style "Grouped" which I use to set some options in my App. I'd like for one of the cells of this UITableView to only show up depending on whether another of this UITableView's cells is activated or not. If it's not, the first cell should show up (preferably with a smooth animation), if it is, the first cell shou...

NSFetchedResultsController for map annotations

The documentation for the NSFetchedResultsController states that it is intended for use to 'efficiently manage the results returned from a Core Data fetch request to provide data for a UITableView object'. Could I use an NSFetchedResultsController to manage a collection of map annotations as well? I am not sure how I would do this. Any ...

Simulating keyboard tap

Is there a way to programmatically tap a key, just as a user would so the key pop up animation takes place? ...

viewController, display methods called?

I am just trying to work out how the viewController is working in a simple iPhone app. My question is I am trying to see when the functions below get called, I have put NSLog commands in there to print to the console, but I don't see any of the below printing either when running or exiting my app, do they get called, should I see anythin...

Is it possible to catch touch events on the iPhone using pure C?

In iPhone applications you can catch touch events through the UIEvent and its associated set of UITouch instances, but this happens at Objective-C level. What I am looking for is a way to get this information at a lower level, in C code (no Objective-C involved), and in particular I'm thinking of Core Foundation data structures, similarl...

iPhone delegate & controller dealloc?

I have been playing with a simple iphone app and decided to put an NSLog statement in the deallocs of both the controller and the delegate but neither of these print out to the Xcode console? // APPLICATION DELEGATE #import "iPhone_buttonFunAppDelegate.h" #import "iPhone_buttonFunViewController.h" @implementation iPhone_buttonFunAppDe...

Design strategy advice for defining machine system functionality

This question relates to project design. The project takes an electrical system and defines it function programatically. Now that I'm knee-deep in defining the system, I'm incorporating a significant amount of interaction which causes the system to configure itself appropriately. Example: the system opens and closes electrical contact...

iPhone - Program Received Signal : 0 - on device but not on simulator

Hi, I'm sure this is memory related but I can't seem to figure out what variable is causing me problems. I'm releasing everything I allocate as far as I can tell. This loop seems to work fine if it runs 365 times but not 730 (its doing days in a year). Here is the snippet of code that is failing.. it never gets out of the loop when th...