I have a table which has a couple of rows.I have two custom buttons on the cell .One of them is used to delete the row. I am trying to get the delete conformation button which is normally displayed on swipe to delete gesture on the row using the custom button press.
can someone please suggest a solution for the above problem.
thanks.
in short i want to replace the swipe gesture by a button press to make the framework provided delete button appear
Can you elaborate? It's not clear to me whether you want to replace the behaviour of the regular swipe-to-make-delete-button-appear (and if so, sounds like you might be reinventing the wheel), or if you want to have a swipe just automatically call your own delete button?
EDIT
Based on your comment, I think you want what's already posted here: Is it possible to programmatically show the red delete button on a UITableViewCell?
Related
In my app, I have a text field that works fine, however after going back to the main menu and then back onto the page with the text field, the text field becomes un-touchable, the keyboard does not show no matter how many times you click it.
Here is a screen shot of the interface http://tinypic.com/view.php?pic=y11sm&s=6
I think I may have to add code or connect an action with the text field, but how?
Thanks for your time.
You can remove subviews that you don't use anymore like #Kim has already told you or if you need these subviews but they are blocking the action, you can bring your textfield to front using,
[your_view bringSubviewToFront: your_textfield];
I have a people picker inside a UIPopoverController, since it has a search field, which will trigger the keyboard when tapped, then I got this ugly result:
the arrow of the popover is UP which is best look in my app, I also tried to use UP | DOWN but it does not work(still always UP), I know I can use only DOWN arrow instead, but that should be the last solution, I wonder is there any method to deal with this?
Thanks!
update:
I was thinking that can I use UP arrow first, then when the search field becomes first responds(not sure how to detect this), I change it to DOWN arrow(also not sure how to do this)?
update 2:
also the view is not a table or something that can be scrolled, so I cannot scroll the view to make the popover look fine.
You are right, that is quite an ugly resolution.
The problem is that the UIPopoverController is coded to avoid colling with the keyboard view.
I think the only way you can work around this is to either create a custom UIPopoverController that ignores the keyboard appearing (i believe some listeners needs to be disabled on either the SharedApplication or mainscreen) or make a custom UIView that holds this.
I am making an app. It is kind of a hide and go seek. I was thinking about sectioning off separate areas and having the app say something different as to where you touched the screen. It will give you clues to where on the screen you need to touch next. So, these are my questions:
What is the easiest way? Would I want to make a grid of roundrectbuttons-placing each one and making an outlet for each - or can I make grid of buttons some other on the screen.If I place each button I will have a 9x12 of buttons making 108 buttons. Then I need to have a way to choose a random button as to where the location of the thing is question is. Would I use buttons at all or is there an easier way?
108 buttons is far too many to place in a xib :) If you wanted to use buttons then I would create them programatically in viewDidLoad in your controller.
Hoewever, I wouldn't use buttons at all!
I would use a TapGestureRecognizer attached to your background view. When you recieve a tap, take a look at where it was (use locationInView:self.view) and use that to work out what to do with the press.
My iPad (!!) app has a table view as the UISplitViewControllers details controller. To trigger various actions I use the following:
A swipe gesture on the cells to make a button visible that is called "Action".
Touching the action button shows a UIActionSheet with various options (Delete, Send, Download).
Touching one of the buttons in the action sheet triggers the action.
To achieve this behavior I customized the title of the "Delete" button which would normally be shown by the swipe gesture.
Please note that touching the cell itself will open/preview the touched item.
However, my test users complain that they cannot find the action menu because they would never try swiping the cells and if they would, they would do it to delete the entry. But they like that touching the cell previews the item.
Hence my question: what is the correct way of doing it? Show a disclosure button in every row (the little blue arrow to the right)? Show UIBarButtonItem in every row to bring up the action menu?
I'm so against it because it looks ridiculous to have a button in every row.
Sounds like a tricky situation; I'd either:
Add a detail disclosure button to each cell, and have that push a new view controller with the options (like the YouTube app).
Show the options in the "entry" view and have the "swipe" action an extra, discoverable feature (like the Twitter app).
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?