I am working through the iPhone_3 Development book by Dave Mark and I have a quick question arising from chapter_6 with regards to the way the UIToolbar is placed over the underlying view.
In the example in the book there are 2 controllers with associated views (blueView & yellowView) and a 3rd switchController (UISwitchController). Bot...
I want to know how I would stop my sublass o UIScrollView is not working properly:
- (void) touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view {
if ([touches count] == 2) {
[super touchesShouldBegin:[touches anyObject] withEvent:event inContentView:view];
}
else {
//...
I have an iPhone app that displays a modal view controller. The modal view controller shows two instances of a custom subclass of UITextView called RoundedTextView, an MKMapView, and a UIToolbar. I construct the viewController only once, and reset its data and present it each time the user summons it.
When showing this view controller w...
I'm working on a local (to the method) custom object and need to display a dialog (UIActionSheet or UIAlertView) to the user. What's the best way to get access to same object when delegate is called after user interacts with the dialog? Any Cocoa tricks besides adding another instance variable to current class?
...
Consider aurioTouch sample application provided by Apple. I wanted to simulate a lengthy processing of the recorded audio and modified the sample by introducing a delay of 0.1 second in the render callback method: PerformThru. This leads to a distorted audio and static noise being played through iPhone's speaker or headphones. The noise ...
SOLVED:
This has been solved following the assistance of many people. I'm now writing this, so that people with similar problems can benefit from it. In order for me to recreate this bug, I had to run the distribution build on my device. This was accomplished following MrMage's advice, which told me to change the certificate to the devel...
I have a table view that displays managed objects (Tasks).
I'd like to fetch all tasks and update the table view once a task is added or modified.
Currently refresh the tasks array when NSManagedObjectContextDidSaveNotification is fired.
But I'm afraid that this could be quite inefficient as the table is also updated when other objects ...
I've got a couple dictionaries in a property list, that make up a menu system for my game, like so:
New game
Easy
Normal
Hard
Load game
Recent
Older
Options
Game
Sound
etc.. Each item in this list is a dictionary.
I use UINavigationController and UITableViews to display this menu system. When an item is ch...
I have a tabbar based application and do the following to get a reference to the application delegate:
MyAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
Which then gives this warning:
warning: type 'id <UIApplicationDelegate>' does not conform to the 'UITabBarControllerDelegate'
My application delegate hea...
Hi everyone...
I'm still learning Objective-C so forgive me if this is a simple amateur mistake, but I guess we all have to learn somehow.
Basically I have an app with a simple bit of text, at the header of the screen, which has been IBOutletted and called 'headerText'. I want this to read "Summary for February", replacing February wit...
I am making a grid view. It subclasses tableview and lays out multiple subcells (columns) per cell. That's all working fine.
Now, I need to detect when an individual sub-cell is tapped. I have overriden touchesEnded in the grid view. Is there a way I can take that NSSet of UITouch objects and detect whether it was a touch up inside or ...
Here's my code:
-(void)randommoves
{
NSArray *possiblemoves =[NSArray arrayWithObjects:@"R ",@"R' ",@"L ",@"L' ",@"B ",@"B' ",@"F ",@"F' ",@"U ",@"U' ",@"D ",@"D' ", nil];
NSMutableString *finalmoves = [[NSMutableString alloc] init];
finalmoves = [NSMutableString stringWithCapacity:0];
[finalmoves retain];
int i = 0;
for (i=0; i<20; i...
I'm trying to figure out how to calculate where the scrollview will stop when a user does a swipe gesture and the scrollview goes into deceleration. I'm trying to use the delegate functions, but I can't accurately figure it out. Please help!
- (void) scrollViewDidScroll:(UIScrollView *)scrollView;
- (void) scrollViewWillBeginDeceleratin...
I have a TableView in my application and I've created a centered label inside TableViewCell that I'm placing in the view. When TableView is in standard mode everything is ok and the label is really centered. However when I change the mode to grouped then the label is displayed slightly to the right. I suspect this is because in grouped m...
I'm using Core Data in my first iPhone application and trying to understand NSFetchedResultsController. It works great in my root view. Do I need to instantiate an instance in every one of my view controllers? If so, is there a template that makes this as easy as it was in my root controller (I just checked a box in the template when cre...
I have an iPhone app which has a tabBarController as the root view controller in mainwindow.xib.
One of the tabs has a class of UINavigationController and its View is loaded from an external Nib file currently called secondView.xib
How can I get a UIBarButtonItem which is on the NavigationController in the mainwindow.xib file to trig...
I created a UIView xib in Interface Builder and tried everything I could to indicate that the UIView should center itself, anchor itself at center, orient itself in central coordinates, etc. etc.
But whenever I add it as a subview in code, I also have to programmatically set its frame up with CGRectMake() or else it will always add to t...
I'm plotting over 500 points on a map using mapkit. Zooming is a little jittery compared to the native google map app. I've discovered what is causing the slowness. I'm adding custom annotations so that I can later add different pin colors and buttons for detail views:
- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnota...
I have a number of web views in my app in which I need to be careful about allowing further HTML links.
I disallow links in the delegate method shouldStartLoadWithRequest. This works fine, except for one thing. In the web view, the links are still highlighted in blue. So the user naturally thinks they are active links, but when select...
Is there a way to invoke TouchesBegan, TouchesMoved, TouchedEnded programmatically ??
...