uikit

UITextField not showing when added as subview.

Hello. I'm making an Opengl ES application and I am trying to work out how to incorporate parts of the UIKit GUI over the view with the OpenGL ES working on it. In the init method of the EAGLView class I have this to setup the UITextField: add_name_field = [[UITextField alloc] initWithFrame: CGRectMake(10, 10, [UIScreen mainScreen].bo...

Checking if UIGraphicsBeginImageContextWithOptions is supported

I'm working on an iOS app. It currently only works on iOS 4 since I use the following method on several occasions: "UIGraphicsBeginImageContextWithOptions". This method is only available in iOS 4 and therefor my app currently crashes/doesn't work on iPhone OS 3. Aside from this method there is no reason why the app should not work on iPh...

back ground for grouped uitableview in iphone sdk

hi guys a new problem has crept up for me.I want to set an image as a table's background.Its a grouped table view.im doing this using IB. i set the background color property for the table view as clearcolor and placed tan image view in the view on which the table view is placed./it looks good on ib,but when the application is loaded t...

How to customize UIWebView tap-hold-on-link sheet

Hi, I was wondering how I can override the UIActionSheet that appears when tapping and holding your finger on a link in an UIWebView (it shows the link and an open and copy button). I need to add a button to the alert, but I don't know how to customize it. Does anyone have an idea on how to solve this? ...

Adding a button to UIDatePicker

Is it possible to add a 'Done' button to a UIDatePickerView,so that users can tap it to dismiss the view. ...

Add a shadow to a masked image

Hi there, I'm currently creating irregular images and I'd like to add a shadow to it programmatically : 1) load image (png file) 2) load mask (png file) 3) mask image with mask : output is an UIImage 4) add shadow to the irregular image (not squared nor circle) ...?? how do i do point 4 : should I 1) copy the current image 2) th...

UIPickerView problem about selecting first value

Hi all, I succesfully implemented a UIPickerView. However, I have a problem in selecting values. According to the standard way, I have implemented the method - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { // method implementation... } The problem is when I try to sel...

How should I organize a project with three distinct views and no tab/tool/navbars?

I've spent too much time walking down dead ends on this project, so it's time to query the hive mind: I am making a simple iPad game consisting of three locations which the user navigates between when an area of the screen is touched. These locations are represented by fullscreen images and there are a lot of different animations and st...

Flip the Image when saving out to disk

I am currently using the following code to write a CGContext to a PNG on disk: CGImageRef image = CGBitmapContextCreateImage(context); UIImage *myImage = [UIImage imageWithCGImage:image]; NSData *data = UIImagePNGRepresentation(myImage); [data writeToFile:path atomically:YES]; I found that the orientation of the resultant file is flip...

No thumbnail in iPhoto for images saved with UIImageWriteToSavedPhotosAlbum

My application downloads JPEG images from the web and save them to the device using UIImageWriteToSavedPhotosAlbum. All works fine except for one issue: when I browse iPhone's photo library with iPhoto, some images have no thumbnails -- an empty dashed rectangle is displayed instead. Those JPEG images application downloads are also gener...

determine if uiview is displayed

hey! is there a possibility to determine if an uiview obj is going to be displayed. imagine: you have 2 uiviews in an uiscrollview. now you are going to switch per gesture from the first view to the second. the first view now is NOT in the viewport. now you are going to go back to the first view. and now I want to be notified that this ...

set minimum date for UIDatePicker

ive a scenario where the user selects a starting and ending date using UIDatePicker.I want to set the minimum date of the picker as the starting date set by the user after he selects the starting date.I tried 'setminimumdate',but that doesnt work.Any other methods?? ...

Strange Behavior with touches near a UINavigationBar

I've recently come across a weird bug with UINavigationBars. For some reason, the UINavigationBar "absorbs" any touches that land around 8 pixels below the bar. A good description of this behavior can be seen here: http://dinhviethoa.wordpress.com/2009/02/14/uinavigationbar-and-touch-events-strange-behavior/ None of the touches will r...

Always getting the same height using sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode:

The CGSize returned by sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode: contains always the same height. Why is that, and is there a way around this? I want to align a string vertically and it may not be truncated, unless it can't fit on a single line using the minimum font size. So I try to use this method to get the lin...

How do I show a modalviewcontroller well in a tableview

I need to show a modal view controller when users click a info button on the top right of my application. ...

Draw triangular UIButton on iPhone?

What would be the way to draw a triangular button on the iPhone. It would be nice if I could also change its parameters (backgroundcolor, font etc..) as with the regular buttons. Ideally I would like equilateral triangles. ...

problem in adding second UIbutton in cameraOverlayView

problem in adding second UIbutton in cameraOverlayView ,here i am able to add the first button but not able to add second button with following code - (void)pickAndDecodeFromSource:(UIImagePickerControllerSourceType) sourceType { [self reset]; // Create the Image Picker if ([UIImagePickerController isSourceTypeAvailable:source...

Download Request - iPhone SDK

Hello everyone, I am trying to create an app where the user clicks on a download link through a UIWebView and it will present a pop-up saying "do you want to download this file". I just don't know how to get the download request when the user taps on a download link. If anyone knows how to do this please leave a reply. thanks, Kevin ...

iPhone SDK - Big UITableViewCell

Hello everyone, I just wanted to know what kind of UITableViewCell are on applications such as "Mail", and how to set one up. They seem to have much more length for extra text and other objects. A good sample project or some code/reference link would get me started. Thanks, Kevin ...

iPhone SDK - Play Audio/Video through UIWebView

Hello everyone, I want to know if I could play a mp3 file or mp4 (video) file through an UIWebView by loading a simple url request. I have already tried sending the UIWebView to a video link (e.g. http://google.com/blah.mp4) but it will flash a quick QuickTime logo and show a black screen. However in MobileSafari it streams fine. Is the...