uikit

Is there a programatic way to get standard dimensions in the IPhone SDK

Is there an object or function call that will provide standard dimensions for various user interface elements in the iPhone SDK? Specifically I'm looking for the width of the whitespace gutter the Interface Builder normally recommends you put get between controls and the edge of a view. In windows there is a function call called GetS...

Transformation for twisting a UIView on iPhone

Is there a way to use CATransform3D, or similar, to twist a UIView? What I mean is to rotate the top edge of the view, but keep the bottom edge where it is. All the transformations I've looked at keep the view 'flat'. Is this more of an Open GL task? ...

Resized XIB still full size

Building an iPad app. I have a button on my main view that I want to launch a help window. The help window is fairly involved and has its own xib/controller. I resized the help window's XIB and saved it. I instantiated it and added it to the application controller's views as a modal. For some reason this window is still taking up th...

Figure out UIBarButtonItem frame in window?

Hey guys, UIBarButtonItem does not extend UIView, so there is nothing like a frame property. But is there any way I can get what is it's CGRect frame, relative to the application UIWindow? ...

Custom email form in iPhone app?

Say I want to send email to my server, but I want the user to not see my address, or perhaps I want the subject to be preset. What if I want to email the value of a UISlider or other UI element without the user seeing the whole email view. How can I do that? Must I use an Apple class, or can I use my own UITextFields? ...

iPhone 3.1.3: All my UIButtons and UITableRowViews are now gray

Not sure how this happened, but all of the UITableRowViews and roundrect-style UIButtons in my app—spanning a dozen or so views—are now all gray instead of white. Unfortunately, I have no idea how this happened. (In fact, I had no idea it was possible to do this.) Explicitly setting the button's or tableRowView's background color to whi...

How do I add an extra separator to the top of a UITableView?

Hi, I have a view for the iPhone that is basically split in two, with an informational display in the top half, and a UITableView for selecting actions in the bottom half. The problem is that there is no border or separator above the first cell in the UITableView, so the first item in the list looks funny. How can I add an extra separa...

Puzzled with nib files...

I know nib files are serialized objects and they have owner, outlets to make connections. Using XCode Navigation window template I created application, which in its order created 2 nib files - MainWindow and SecondView. I can't understand how MainWindow is referring to SecondView, there is no connection between those two as far as I can ...

how to resign keyBoard as a firstResponder from a textView??

Hi I want to resign the keyboard from the text view as a first responder.I want as soon as user hits the return key after editing in a textView the keyboard should resign.But I am not sure how should I do this??? ...

Great UIKit/Objective-C code snippets

New to Objective-C iPhone/iPod touch/iPad development, but I'm starting to discover lots of power in one-liners of code such as this: [UIApplication sharedApplication].applicationIconBadgeNumber = 10; Which will display that distinctive red notification badge on your app iphone with the number 10. Please share you favorite one or two...

Where is the leak?

UIGraphicsBeginImageContext(targetSize); //instruments show here a leak 128bytes CGRect thumbnailRect = CGRectZero; thumbnailRect.origin = thumbnailPoint; thumbnailRect.size.width = scaledWidth; thumbnailRect.size.height = scaledHeight; [sourceImage drawInRect:thumbnailRect]; newImage = UIGraphicsGetImageFromCurrentImageContext(); U...

UIKeyboard slides from wrong coordinates when in landscape, why?

Hi I have an app that starts in Landscape Right mode. When I tap a textField the keyboard should slide up, however first time when the keyboard slides it slides from the right (where the home button is). After that it slides up and down as expected. So only the first time when I call the keyboard in it comes from where it would com...

How can I capture the amount of surface area that the user is making contact with the iPhone screen?

Is there a way to capture the amount of screen that is making contact with the users? I assume there is since this finger painting app shows the ipad responding to only the pixels that the user makes contact with. Thanks so much in advance for your help! ...

I cannot get the value of a table view cell in cocoa touch

I am trying to get the value of a cell in a table view but it won't let me. If someone could help that would be great. int numberOfChecks = -1; numberOfChecks = numberOfChecks +1; if ([objectsForTable count]-1 >= numberOfChecks) { UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:numberOfChecks]; NSS...

CGContext rotation

I have a 100x100 pixel image that I want to draw at various angles rotated around the center of the image. The following code works, but rotates around the original origo of the coordinate system (upper left hand corner) and not the translated location. Thus the image is not rotated around itself but around the upper left corner of the s...

Using UIKit from C/C++

The questions might have been already asked, but I want to understand if iPhone's frameworks limited only to Objective-C use or it could also be accessed from C/C++ code? For example, is it possible to use standard iPhone controls from C/C++ code? Are standard classes like NSArray, NSSet accessible from C/C++ code? If they are, could a...

UIModalPresentationFormSheet on iPad in landscape mode

I created a UIViewController view from XIB with modalPresentationStyle set to UIModalPresentationFormSheet and everything works great in portrait mode. When I switch to landscape the view gets moved upperleft (it's not centered as it should be) and most part of it is clipped. Any ideas why this is happening and how to solve it? Thanks ...

iPhone UI controls

Which class is used to create the clickable sections(with > arrow) and the checkbox list on last shot? ...

iPhone app memory leaks from core frameworks

Are these kind of leaks normal? Are they false leaks or something I should be concerned with? The instruments tool doesn't give me any line of code from my app, seems Apple's frameworks are leaking?! Ok, the problems could only come from here: (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexP...

Creating UITableViewCell programatically

I want to create a tableviewcell and add it on the view(not tableview) as CGRect aframe=CGRectMake( 20, 20, 200, 200); UITableViewCell *cell =[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; cell.frame=aframe; [self.view addSubview:cell]; But this is not working at all. Can't we create cell inde...