Use a UIPanGestureRecognizer to rotate view
Is it possible to rotate a view using a UIPanGestureRecognizer? I would like similar functionality to the rotation gesture but with only one finger. Thanks. ...
Is it possible to rotate a view using a UIPanGestureRecognizer? I would like similar functionality to the rotation gesture but with only one finger. Thanks. ...
This is the Core Data object model I am working with (I am a new user, so I can't post pictures directly): http://i965.photobucket.com/albums/ae134/spindler77/Screenshot2010-07-26at112231AM.png All I am trying to do right now is to populate a UITableView with the "className" of every myClass instance the user has created and saved. My...
Times like this and my Objective-C noobness shows. :-/ So, the more I work on a routine to do this, the more complex it's becoming, and I'm wondering if there isn't just a simple method to change the name of a filename in a path. Basically, I want to change @"/some/path/abc.txt to @"/some/path/xyz.txt -- replacing the filename portion b...
Hi, I have a method to check weather a number is even or odd: -(BOOL)numberIsEven:(unsigned int *)x { if (x & 1) { return TRUE; } else { return FALSE; } } however whenever I compile it I get the error: Invalid operands to binary % So it's compiling into assembly as a modulus function and failing, somehow, however if...
Can't figure out why I'm not getting my callback - any advice? -(void) playMovieWithURL:(NSURL *)url { [currentVC.view removeFromSuperview]; MPMoviePlayerViewController *movieControl = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; //register for playback finished call [[NSNotificationCenter defaultCent...
Everytime I get a memory warning, my app crashes. In the debugger, it crashes on the line where i try to set self.navigationItem.rightBarButtonItem = myButton; I implemented didReceiveMemoryWarning: and didn't include [super didReceiveMemoryWarning]. However it still crashes. Why is my view reloading? ...
The data source for my table view is a plain NSMutableArray that will be populated as the app runs, but will be empty when the Table View first loads. The class interface looks like this... @interface ViewController_iPhone : UITableViewController { NSMutableArray *serverList; } @property (retain, readonly) NSMutableArray *serve...
I have the following: NSDateFormatter* df = [[NSDateFormatter alloc]init]; [df setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"]; NSDate* date = [df dateFromString:[sDate stringByReplacingOccurrencesOfString:@"Z" withString:@"-0000"]]; [df release]; I would like the output string to be "9/20/10" How can I do this? ...
how to get digits after decimal point from float number in objective c ...
I would like to add the text "Sent from " to the bottom of the message if([MFMailComposeViewController canSendMail]){ MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; controller.mailComposeDelegate = self; [controller setSubject:[NSString stringWithFormat:@"A message from: %@",se...
is there a sample of code that can guide me to perform drag and drop from my cocoa application to the Finder ? I know that NSFilesPromisePboardType and relative stuff should be used, but so far I can only dnd from Finder to application and locally onto the application. Any help? thanks ! ...
I have a NSArray of Foo objects. @interface Foo : NSObject { } - (NSString *) name; @end I want to be able to join all these [Foo name] results into one NSString. In C# I would get a array of these by using LINQ, creating a Array of it, and feeding it to String.Join(): List<Foo> foo = [..]; String.Join(",", foo.select(F => ...
I'm trying to provide an IBAction method for common functionality that is required at various parts of the app. i.e. Login is implemented modally, and if it succeeds results in a notification that allows all loaded view controllers to react to this event (transition from anonymous to authenticated) @interface MyAppDelegate : NSObject <...
Does anyone know how to find a list of all the possible error codes thrown by the ostest utility, and their meanings? I noticed this to be a common problem for people, where they ask about an OCUnit failure with some code 138 or 139 that is completely opaque to them, and somebody who has encountered that particular error number points ou...
I'd like a UIView to slide up from the bottom of the screen (and stay mid-screen) like a UIActionSheet. How can I accomplish this? UPDATE: I am using the following code: TestView* test = [[TestView alloc] initWithNibName:@"TestView" bundle:nil]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; [UIView setAni...
I'm writing a scanning application that is getting images from a document scanner, turning them into NSImages and then displaying them in an IKImageView. About half of the time, however, when I try to call setImage:ImageProperties in IKImageView, it just hangs. It only happens when I'm getting the image directly from the scanner, as I'...
I am trying to get a random color. I have done it using brute force but this method seems overly laborious (though the distribution is pretty even): - (UIColor *) getRandomColor { // GOAL: reject colors that are too dark float total = 3; float one = arc4random() % 256 / 256.0; total -= one; float two = arc4random() % 256 / 256.0; ...
@interface MySuperclass : NSObject { } @end @interface MySuperclass (MyCategory) - (void)myMethod; @end @interface MySubclass : MySuperclass { } @end @interface MySubclass (MyOtherCategory) - (void)myMethod; @end Is it defined which implementation of -myMethod will be called? Kochan states in Programming in Objective-C that...
Does anyone know if the source code for Objective-C is still available from when it was just a pre-processor? Would be curious to see how it was implemented back then. Thanks. ...
Hey I have problem compiling code in xcode 3.2 I have a code where it's using iOS 4's API, "MFMessageComposeViewController" It would compile fine with 4.0 under xcode, but when when i try to compile with 3.2 I get error because of "MFMessageComposeViewController". It seems that xcode can't find keyword for MFMessageComposeViewController....