I have three images
The first image is a background for alert view
The second image should inside the first image
The third image is an "Ok" button image (When I click it, I should go to the next page)
I would like to add these to a UIAlertView
Would appreciate any guidance.
Prior to iOS7:
You can add image to UIAlertView using
[yourAlertView addSubview:<yourImageView>;
In iOS7+ you can not do this way.
Please see this code available in github that adds image to UIAlertView.
I have done with following custom control. It might be what you are looking for :
https://github.com/wimagguc/ios-custom-alertview
Related
I am new in iOS. I want to know if it is possible to access the retake image button of UIImagePickerController. If so, how do you call a function on that button?
My problem is that I am using UIImagePickerController to take an image from the camera and save the image in the documents directory. I have done my task using a UIImageView and UIAlertView on an other view, but the problem is that I want to save the image before retake image button pressed in camera. What I have to do to achieve this?
You can't do what you want using UIImagePickerController. Instead, use AVFoundation framework for capturing still images in the way you want. Please, check this Apple's sample project http://developer.apple.com/library/ios/#samplecode/AVCam/Introduction/Intro.html.
I have created a forum with a View, and in the View I have placed a Text Field. My problem is, whenever I slide up they keyboard the text from the tableView are placed over the UIView and the TextField being covered. Any Idea what the reason behind this might be? While we are at it, maybe I shouldnt create a View with a TextField and instead use the standard look in iPhone sms apps, but I dont know how they created that bar. Any Ideas? I post all pictures below:
iPhone standard look, how to create something like this?:
My View with the text field:
My problem as i described above:
You can create a custom view for that and add it as an inputAccessoryView of the keyboard.
For more details please check apple documentation on this. When the keyboard is dismissed, show this view at bottom of the screen and when keyboard appears remove it from bottom and make it as inputAccessoryView.
inputAccessoryView:
The custom accessory view to display when the text view becomes the
first responder
Just a quick question, I can't seem to find any examples so far. I am trying to make a textfield in Xcode go fullscreen when users clicks on it. All i need is the code to expand the field fullscreen so other fields etc. are not visible while the user enters text. Then once the user is finished and clicks done, the previous screen returns with the text entered saved inside the field. Any ideas? Thanks
CGRect oldFrame = myTextFieldOutlet.frame;
myTextFieldOutlet.frame = CGRectMake(0,0,320,460);
...then when you want to restore it to normal...
myTextFieldOutlet.frame = oldFrame;
In fairness, I think you would be better off with a separate view for that textview you present modally (and return the text from), than what you are talking about.
How to crop an image coming from server into popup? I have image coming from web service and showing it into a popup on a click on a table. I want to add cropping functionality into it. How can I do it??
There are a number of open source image cropping libraries on cocoacontrols.com Here's one that replicates Apple's crop image feature. You can then display the editing view controller in a popover when the user selects the row.
I'm working with Xcode doing a Ipad app.
i simply want user to click anywhere on screen (not counting text fields) to perform some IBAction.I'm using an invisible button that covers my whole view.
Since I have some text fields in my view,i need to add this invisible button to the background of my user interface. I cant seem to find this option in the button attributes? any help?
Just set the button's type to custom.
Did you try setting the opacity of the button to zero?
I guess i got your point. You just want to put the UIButton(invisible) on the back of all the UITextField. The simple solution to this is open the Document Window in the IB. Now expand the view tree in the list view. Just drag your UIButton above the UITextFields and set the alpha value for the button in the property to be zero.
Hope this helps!!
iPad users don't "click". They "tap" or "touch".
In Interface Builder, I believe views are constructed with a z-index from top to bottom as they appear in the document window, so dragging your button so that it appears as the first subview of your main view should be a quick fix for this.
Have you considered other approaches? This doesn't sound like standard behaviour for an app and will probably cause havoc with anybody using Voice Over. What are you trying to accomplish?