Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
My code allows for sliding a UITableViewCell to the left, it shows a delete button. How do I make something similar on the right that I can customize?
Try out SWTableViewCell open-source library. It lets you add custom utility buttons on different swipe directions.
In your UITableView's tableView:cellForRowAtIndexPath: method set up needed buttons:
cell.leftUtilityButtons = [self leftButtons];
cell.rightUtilityButtons = [self rightButtons];
cell.delegate = self;
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
How could I define a clickable area on a UIImageview in swift ?
This area as to be fixed on the image even if I zoom or drag it.
Using the same technique as I recommended in this answer, add a gesturereconizer:
How to make whole call out tappable?
Add a button to the image via programatically (IBuilder doesn't allow that)
Set userInteractionEnabled = true on imageView
Set the button either via AutoLayout or using springs and struts approach to resize with imageview.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I need to implement a custom behavior in my uitableView Accessory Cell, the behavior is equals the behavior at iOS mail, and WhatsApp. With bounce and animations
You need to use accessoryButtonTappedForRowWithIndexPath where you can grab the indexpath of the row that was selected and do appropriate work.
For the animations you can use UIView animation blocks, or even animate over bezier paths.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
i am looking for a solution to customize a UISwitch
the desigred looks lie this :
how would you managed it?
Here is a tutorial which can help you to create custom UISwitch. It mention to ways to create custom UISwitch. Concept is to subclass UISwitch class and add custom things in it.
You can use a UIbutton and toggle its image for On/Off.
Or else if you want to make animation to toggle On/Off you should use your custom view. Please see this answer
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have x number of views in a row:
[view1] [view2] [view3]
I need to be able to drag and reorder anyone of them (just in the horizontal direction), and also need to insert new views.
How would you implement this?
I guess something like this:
- (void)didDragView:(UIView *)currentView
{
for (UIView *v in self.viewsArray)
{
if (currentView.center.x < v.center.x)
// Move view to index: [self.viewsArray indexOfObject:v];
}
}
I think this might help
http://undefinedvalue.com/2010/02/05/iphone-sample-code-tiles
However, you need some code change in order to support horizontal direction only
you should use a collection view and this category:
DraggableCollectionView
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
As you see, a image cycle show area. is it in the first cell of table or some other ways implement?
Does it scroll with the content or is it static?
If it scrolls with the content:
Using tableHeaderView is the easiest solution.
If it is static:
Just layout as a separate view above the UITableView in Interface Builder or code.
You can create a small pagecontrol with scrollView and add that to tableHeaderView and then you can achieve the functionality shown in picture.