This code works to rotate:
CGAffineTransform transform = CGAffineTransformMakeRotation(radians(lastAngle++));
anImage.transform = transform;
and this code works to move my UIImageView
CGRect frame = [anImage frame];
frame.origin.x+=1;
frame.origin.y+=1;
[anImage setFrame:frame];
but when I combine them, the image str...
I am trying to load a video from the web, but am having trouble getting it to appear in QuickTime. I can only hear the audio. I would like it to launch QuickTime.
- (void)loadView {
NSURL *movieURL = [NSURL URLWithString:@"http://movies.apple.com/media/us/mac/getamac/2009/apple-mvp-biohazard_suit-us-20090419_480x272.mov"];
if ...
In my app, I'm designing a custom picker that allows the user to choose an item by scrolling horizontally and touching it. I need the buttons inside that view to loop around infinitely as the user scrolls in a certain direction. What would be the best way to tackle this feature while maintaining the inertial scrolling of UIScrollView whe...
I have a UITableViewController inside a navigationController inside a tabBarController; so far, so good. However, when the user clicks on a button on the navigation bar (at the top), I want to display a toolbar at the bottom of the screen with various actions that can be performed on the table. When I define an NSArray *toolbarItems and ...
I'm having some problems with storing variables from my touch events. The warning I get when I run this is that coord and icoord are unused, but I used them in the viewDidLoad implementation, is there a reason why this does not work? Any suggestions?
#import "iGameViewController.h"
@implementation iGameViewController
@synthesize pla...
In a custom UIViewController, if I have a member UINavigationController that I initialize with self as the root view, like this:
navController = [[UINavigationController alloc] initWithRootViewController:self];
then presenting a modal dialog does not hide the tab bar at the bottom of the screen. The result is that if the user switches...
Hi,
I am writing a game in cocos2d. In the iPad Simulator the application is running good.
While I am running the application in the iPad.
But it was crashing by giving the following message in terminal. I am using 2048x2048 CCSpriteSheets in my code.
I used instruments tool there is sudden increase in memory to 32MB before crashing. I...
So, I've searched quite a bit for this and can't seem to find a solution.
This code works:
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationDuration:5];
[c setCenter:CGPointMake(200, 200)];
[UIView commitAnimations];
This code doesn't:
CGContextRef context = UIGr...
Everything about this UIButton renders great except the text that's supposed to be on it. NSLog demonstrates that the text is in the right place. What gives?
UIButton *newTagButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[newTagButton addTarget:self action:@selector(showNewTagField) forControlEvents:UIControlEventTouchUpIns...
I have the need for some time based effects in the iPad app I am building. The UIView class animation capability beginAnimations/commitAnimations is exactly the sort of thing I am looking for but it is restricted to specific properties of UIView deemed animatable.
Ideally, I am looking for a solution that lets me drive a time-based func...
How can I convert an NSDate to a Unix timestamp in Objective-C?
...
I know Apple is not the only ressource out there, and many people create great videos in conferences and presentations.
If someone knows a great video or podcast on the topics KVC or KVO, please let me know. I would be glad about it!
Edit: Changed Title so it's more clear this is indeed programming related. KVO / KVC / MVC != KFC
...
To gain a better understanding, I think it would be great to watch every video available on the net. For me, training videos became sort of entertaining. I love them! And at the same time, it's the most productive form of "watching movies".
Unfortunately, I tend to find videos from conferences or podcasts only by accident, so maybe you ...
I haven't seen any other questions quite like this on here, but I'm hoping someone has some insight. I'm just starting to learn Core Data.
Basically, I have two methods and I want to choose which one to call with an if/else statement based on whether or not the "Contacts" table contains any records. Is there a way using core data to che...
A little background:
My app is designed as a web form in a UITableView. It is similar in format to the iPhone's Settings > Mail,Contacts,Calendars > "Account Name" > Account Info. A few differences: 1) I have a big text box on the bottom where you can put a "message body". 2) I have a big red button underneath the text box, similar to...
I have a NIB that contains a UINavigationController which has a UIViewController. The UIViewController is being loaded externally from another nib. I am unable to set the view property thus I get the error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed...
If I am loading a view from another NIB, how do I set the File's Owner view property? IB is not letting me hook it up to my View Controller which is loading the external NIB.
My NIB looks like this:
File's Owner - Identity is set to LBRootViewController
First Responder
LBTableViewController - Identity is set to LBTableViewController,...
I have malloc'd a whole mess of data in an NSOperation instance. I have a pointer:
data = malloc(humungous_amounts_of_god_knows_what);
uint8_t* data;
How do I package this up as an NSData instance and return it to the main thread? I am assuming that after conversion to an NSData instance I can simply call:
free(data);
Yes?
Also, b...
I want to design an app that launches other sub-apps.
Main View will contain 4 buttons. Clicking on each button respectively will launch the other sub-apps.
Each sub-app will have a UITabBarController which has its own different views. At any point I want the user to be able to go back to the Main View from any of the sub-apps.
I am n...
Hi all,
I have RGB values that I need to convert into CMYK values. I'm using the iPhone SDK to try and do this.
I have tried a couple of things, but cannot either get the values to be anything other than 0 or 1, or the K element is completely wrong (showing up as a negative number).
Any help would be a life saver!
Thanks in advance!
...