objective-c

Underlying value of an NSDate (DateValue)

To debug a DB app I need to verify the datevalue against the value that arrives in my SQLiteDB. Is there a way to show the double(?)-value of an NSDate (in code covert it to a double?) ...

iPad/objective-C synchronous HTTP request example?

I can only find asynchronous iPad/objective C HTTP examples. How do I do a synchronous web request? ...

How to get rect size of UITableViewCell?

How can I get the rect size of a UITableViewCell? I am trying to display a pop hover every time the user clicks on a cell, and would like the pop hover to appear centered on every cell: [replyPopover presentPopoverFromRect:CGRectMake(77, 25, 408, 68) inView:self.view permittedArrowDirections...

Declare an Objective-C static method that can be called without a class instance?

How do you declare an Objective-C static method that can be called without a class instance? ...

swapping views with cool page turn animation

Below is code that I'm using to swap views MySecondViewController *tempVC = [[MySecondViewController alloc] initWithNibName:@"MySecondView"]; [self presentModalViewController:tempVC animated:YES]; [tempVC passDataWithString:@"a string" andColor:yellowcolor]; How can I get the cool page turning animation (as with iBook or ROAD RAGE SIG...

UIImagePickerController can not select picture

I have some problem when i work with UIImagePickerController .when I presentModalViewController,and the picker pops up right,but i can not select a picture! when i touch on the picture list, the list can only scroll up and down,but can not select! how about this? thanks. ...

Given an IBOutlet pointer in Objective-C/iPad, how do you hide that element?

Given an IBOutlet pointer in Objective-C/iPad, how do you hide that element? Want to remove it from the screen by making it invisible, hiding it, removing it? ...

Assign pointers in objective C

-(id)setBigObject:(BigObject *)abc{ self.wl = abc; abc.smallObject = self.smallObject; } I have a abc, which is a big Object, when the user pass the bigObject, abc. I assign to my wl value, so , I write "self.wl = abc;", but I want my smallObject assign to the abc's smallObject, so, I do "abc.smallObject = self.smallObject; ...

How can I make Director to be attached multiple times, each time to different view

Hello to all. I need to attach cc2d Director in different views. After a lot of manipulations I found that I can't use only one instance of EAGLView that is present in [Direcor sharedDirector]. So, I have done some changes, and now I use a separate instances of EAGLView for each view. The problem I am trying to solve, could be describe...

How to get total height of a UITableViewCell?

I have subclassed a UITableViewCell and within this class I want to get it's height. How can I achieve this? I have tried: self.frame.size.height but not sure if it is giving me the correct height value. ...

Why doesn't this code work?

SignView *tempVC = [[SignView alloc] initWithNibName:@"SignView" bundle:Nil]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; [UIView setAnimationDelay:0.5f]; [UIView setAnimationDuration:2.0f]; [UIView commitAnimations]; [self presentModalViewCon...

[Cocoa] Leaks reports seemingly unrelated issues

I'm fairly new to Cocoa and Objective-C. Currently I'm developing a fairly basic application to test my knowledge and put some of the stuff I've been reading about into practice. Everything is working, but Leaks reports a number of issues. None of these leaks seems to be directly applicable to code that I've written (I have read and tr...

how do I copy UITextField data into a UILabel

I have a textfield and a label. When you touch the textfield, the keyboard appears In IB, the textfield's properties are Keyboard: ASCII Capable Return Key: Done I wired the IBOutlet to the label and the textfield. How do I get the keyboard to go away when I'm done entering text. How do I get to copy the text to the UIlabel? thanks...

UIWebView not loading URL

I'm having trouble getting a UIWebView to load a URL that I'm sending to it. Before I get into my code I was wondering if URL has to start with "http://" or can it start with "www."? I'm using an IBAction to push a UIView on to the stack: (IBAction)goToWebView { WebViewController *webController = [[WebViewController alloc] initWithNib...

MFMailComposeViewController and cancelling "save" action sheet?

i am using MFMailComposeViewController inside my iphone app. I notice that if i enter any text in the body and then press the cancel button, i am prompted with an action sheet with an option to save/don't save the unsent message. I have two questions: can I programmatically prevent the "save/don't save action sheet from appearing? MFMa...

Is there anything wrong with calling objc_msgSend directly?

I would of course use the appropriate version (stret or normal) for the circumstance. ...

Using accelerometer to detect iPad lock switch trigger?

So for complicated reasons I am managing view rotations myself, and am only implementing UIDeviceOrientationPortrait as the autorotating orientation. Anyway, when one clicks the screen lock on the iPad, the device will rotate to UIDeviceOrientationPortrait, which will cause my code to rotate, which I do not want to happen. For instance ...

Cocoa touch - creating view template for iPad

Hi, This is kinda a hard question to describe. I'm just starting to make an iPad app. Now with the amount of real estate I have, I'm planning to have different but similar "views" to populate the space. (might be easier to think a newspaper site, where many of the columns are similar) I would like to create a "view template" so I can...

Can I access the Cocoa Accessibility API from with Java on OSX?

I need to write an app which can observe and manipulate the positions of windows on screen, and I've been told that this requires using Cocoa's Accessibility API. Unfortunately I'm a Java programmer, and Objective C scares me ;) Is it possible to access this Cocoa API from within Java? I know that back when Apple cared about Java it m...

Using NSDictionary throughout an iphone project

Hi guys, How do you access a NSDictionary in different NSViewControllers. The NSDictionary was initialized in my delegate file. Do I have to import my delegate file to each view controller file or do all my views on top of my delegate know of my NSDictionary? Do I possibly need to declare my Dictionary in each file? -Thanks Guy ...