How to implement Circular iCarosel? - ios

I tried all the ways by setting the respective value's but i'm unable
get below one by using iCaurosel,or is there any controller which gives same functionality
? can you help me?

You should choose iCarousel type to wheel:
self.carousel.type = iCarouselTypeWheel;
but if you mean items margin, this is not possible:
https://github.com/nicklockwood/iCarousel/issues/306

Please check following sample. this is dynamic circles (views) you can add.:)
https://github.com/mpospese/CircleLayout
Happy coding.

You can achieve the same functionality by creating the custom circular UICollectionView layout.Please visit the following link to solve this.
http://developer.xamarin.com/guides/ios/user_interface/introduction_to_collection_views/

You can do this using carousel.type = iCarouselTypeWheel and then using the carousel:valueForOption:withDefault: delegate method to adjust circle radius, number of items shown, etc.
To position the circle off-center like that, use carousel.contentOffset.
You may find that the gesture handling is a bit weird though, because the pan gesture will still be linear even though the view appears circular.

Related

Swift - ios - creating ballon buttons

I want to create a set of buttons that will look like this:
(The selected buttons are those with a different background)
Any ideas for a simple implementation?
Are there any known open source implementations for this?
Thanks!
Following is the library which may be use to solve your problem,
For different appearance you need to give the conditional code for that but with out that your problem may solve with this library or code.
You can download the sample code of RRTagController project here.
For rounded corners use UIButton.layer.cornerRadius. if you set corner radius to half of the box you will get circle. For the border color use layer.borderColor = UIColor.redColor().CGColor.
For the background color of the button you can keep track with selected state of the button. Here is an example of using selected state: UIButton state selected
Next thing you could do is to keep data about selected ones, since the best way to do something like this would be UITableView - seems like every row of buttons have same height, and if you want to send that somewhere you can keep track about what items are selected.
I think the best way is to use UICollectionView.

Why setClipsToBounds:NO disables setCornerRadius: for UItableview?

I'm creating UIItableview. For the first cell I want to have a user Image with a button to allow him to change the image. (not so complicated).
Somehow I have a strange problem: When I set setMasksToBounds:NO the [self.userTable.layer setCornerRadius:20.0]; is simply get disabled.
I am attaching a code with output example:
//Initiate UserTable
//[self.userTable setClipsToBounds:NO];//from the documentation this line is set by default
[self.userTable.layer setCornerRadius:20.0];
[self.view addSubview:self.userTable];
later in cellForRowAtIndexPath: I add:
[myCellView.contentView addSubview:photo]; //My photo is UImageview
If I uncomment the line [self.userTable setClipsToBounds:NO] I get:
but my corners are not rounded any more......
I read the following questions
this and this and still cant figure that out?
Did someone had this problem and can provide a fix which will not force me to change all my code? and also how the 2 options are related to each other?
Thanks a lot.
Calling setCornerRadius applies a mask to your CALayer, which is then used to mask the bounds and create the rounded corner effect.
By calling setMasksToBounds:NO, you are disabling the mechanism used to round the corners.
In short, you can't have it both ways.
Consider making that row in the tableview taller, or using a custom view instead of a standard UITableViewCell.

How to make SWTableViewCell swipe more sticky

I've implemented the SWTableViewCell code in order to allow side swipes to reveal more UI, such as buttons.
Which is working fine, except that the UIScrollview it subclasses is really just too touchy, flicking back and forth like a manic game of ping pong.
I went to make changes to the class, but realised UIScrollView didn't seem to give me the ability to say change the way the scrolling animations work in the way I wanted.
Leaving me thinking that I either need to create my own version of the a Swipe cell, with a pan gesture and a overlay view, instead of a scrollview or find someone who has already solved this problem.
Please check it out sample: https://github.com/runmad/RMSwipeTableViewCell
May be it will helpful to you, Sir
:)
Not sure if this will give you the effect you desire, but you can make it less "jumpy" by altering the decelerationRate. Try:
someScrollView.decelerationRate = UIScrollViewDecelerationRateFast;
If that's the right idea, you can jump-to-definition in Xcode, and checkout the float value, then try your own.

How to draw inside a view in a UIScrollView or UIViewVontroller?

I want to implement a signature feature in my tabbar application. I want to add a subView to a UIScrollView or UIViewController (which ever is the more appropriate and easier). Which control should I use for it?
I want to pick the touch events on the signature view and draw on those points to get the signature. Any help would be highly appreciated.
You can use just a UIView for drawing points get touched. I needed to implement something like that and the following page was really helpful. It explains all with code. You may want to check it out.
http://www.effectiveui.com/blog/2011/12/02/how-to-build-a-simple-painting-app-for-ios/
First thing you need to read is this - http://developer.apple.com
and check this apple demo - GLPaint
after that you may check this - tutorial

Designing a circular "selector" control

I'm developing an app that calculates poker odds, and now I'm facing some problems with the card selector.
This is a mockup of what I want.
I've found two ways to accomplish this. The first one is to use an entire UIImageView and detect touches, calculate where the touch has been generated, and set the corresponding value.
The second one is to use a lot of UIButtons, but in this case I get problems with the shape of the buttons.
Of course I can use a regular UIPickerView and so on but I think that the one I've designed is better.
if you have a UIButton with a background image that is shaped irregular. then that is the only point that the button can be pressed.
Change the type to custom and put your slices into buttons.
This has been my experience anyhow.
My buttons have to have a .01 alpha background to increase their pad size and people can push the button.
Hope that helps :)
After googled a little i've found https://github.com/ole/OBShapedButton .
it does anything what i need

Resources