I'm a big believer in testing, but not a very good practitioner. I've done pretty well at getting coverage on my model objects and programming them in a TDD style. I'm actually enjoying it so much I'd love to extend this to my controller layer, particularly my UIViewController subclasses.
Unfortunately, many UIKit classes don't function...
I have added a UISlider control to an iPhone View-based application and have wired up a text field that gets the values from the slider. To fit with the user interface colors in the application I need to change the color of the slider.
With a little googling I was able to find 2 samples which do this (http://blog.hill-it.be/post/2009/03...
I'm trying to overlay a custom semi-transparent image over a base image. The overlay image is stretchable and created like this:
[[UIImage imageNamed:@"overlay.png"] stretchableImageWithLeftCapWidth:5.0 topCapHeight:5.0]
Then I pass that off to a method that overlays it onto the background image for a button:
- (void)overlayImage:(U...
My colleague and I have been struggling with unit tests now for weeks. We have tried to get SenTest, GTM, and other frameworks set up, but we can never get past a gnarly ball of linking errors.
Here's where I am now with GTM. I would appreciate any guidance.
Beyond helping out on SO, if you have experience with this, I'd happily pay a ...
Hi,
I'm trying to pass a CGRect:
SEL frameSel = NSSelectorFromString(@"setFrame:");
CGRect rect = CGRectMake(10, 10, 200, 100);
[object performSelector:frameSel withObject:rect ];
But this does not compile
I also tried:
SEL frameSel = NSSelectorFromString(@"setFrame:");
CGRect rect = CGRectMake(10, 10, 200, 100);
NSValue * value = ...
I'm trying to retrieve data from an iPhone address book using objective-c/cocoa touch. However, I am getting this error when building:
".objc_class_name_ABPeoplePickerNavigationController", referenced from:
literal-pointer@_OBJC@_cls_refs@ABPeoplePickerNavigationController in InviteController.o
ld: symbol(s) not found
I have already a...
I am new to iphone development.I am sorting a mutable array with respect to date.But it is sorting Using the date parameter consider it as string.I want to sort it by date.How can i achieve that .Please help me out.
NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"pubDate" ascending:YES];
[stories sortUsingDescrip...
I am trying to pass through touches from a custom UIView to a UITableView underneath (the UIView is directly on top of the UITableView). However, it does not seem to be working.
In my custom UIView, I have tried all of the following (I'm using touchesMoved as an example but I've implemented this for all 4 touch methods)
- (void)touche...
Hi,
I would like to know what would be the most elegant approach to extract digits from a double in ObjectiveC using Cocoa Touch (this needs to run on an iPhone):
Let's suppose you have a double : 1.423
How would you get each "1", "4", "2", "3", that compose the double in several variables ?
In the end I would like to get something...
See the screenshot below, this is the only leak the Leaks Instrument finds in my app. Seems odd that main is leaking since it's out-of-the-box. Is this common?
...
My application creates CSV files, stored in the documents directory, with the purpose of being later imported into Microsoft Excel. What is the best way to transfer these files in an end-user-friendly way, via the iPhone USB cable, to a MacBook? If there is some way to do this exclusively with code on the phone itself (doubtful) that w...
I have a UITableView where a cell needs to be filled in with a date by selecting it through a pickerview. Instead of pushing the pickerview onto the navigationController I would want to let it slide up halfway into the screen with the tableview still visible in the upper half of the screen. I've seen some apps doing this neat effect befo...
I'm hoping someone can help me debugging an incredibly frustrating Core Data crash. I initially load data into two entities (representing 'speakers' and 'titles') I then load a third entity for 'sessions' and try to set relationships to 'speakers' and 'titles'. (from session to speaker and title is one-to-one. from speaker/title back...
So here's the functionality that I'm looking for:
1. Main Menu doesn't have the navigation Bar
2. All other screens from the Main Menu do.
3. It should animate correctly
I partially got this to work (just not the back button part).
In the Main Menu viewDidLoad I just go:
[self.navigationController setNavigationBarHidden:YES];
In an...
I'm just starting out with Core Data and right now I'm building my data model. I need a UIColor attribute for my entity, but the type dropdown for the attribute doesn't have an option for this. Do I set it to Undefined or what?
Thanks
...
What I mean is, do animators work on an animation in say Flash (or some other kind
of key frame animation program) and then export it to the iphone somehow?
For example, say I am an animator and I want to create a person waving for an iphone
game. What type of external program would I use and then what libraries on the iphone
sdk would...
Possible Duplicate:
iPhone Interface Builder and Delegates
What is the relationship between these three component in the Objective C / iPhone world? I found that the App Delegate have some relationship with the UI and the variable in code. It match the variable and related UI object on the view. But I found that the File's own...
Hi all~.
I was using simple UINavigationController.
but If I come from sub viewController, I want to occur a some custom event.
For example,
If rootViewController is AA
and subviewController of AA is BB.
and then enter the BB (by pushViewController).
and then, BB->AA.
this time, I want to manage a event.
currently, I made it view UIB...
Hi~ I have one question. ^^
How can i get "selected text" on UIWebView (or UITextView) ?
I'd like to copy "selected text" without copy/paste popup-view.
1) i removed ... copy/paste view. ( it was success~ )
UIMenuController *theMenu = [UIMenuController sharedMenuController];
[theMenu setMenuVisible:NO];
[theMenu update];
2. forced ...
I am currently trying to convert a touch from screenspace, to where it is in worldspace for a 2D game I am working on.
The view I am working on has nearly the same coordinate system as the screen, basically if someone touches the x = 345, y = 500 pixel on the screen, it will be the same on the view, although the y will be backwards beca...