Giter Site home page Giter Site logo

smpagecontrol's People

Contributors

idpaterson avatar jerryhjones avatar mbinna avatar petec avatar th-in-gs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smpagecontrol's Issues

intrinsicContentSize does not behave like UIPageControl

Thanks for open sourcing this component.

I noticed that SMPageControl intrinsicContentSize does not behave like UIPageControl.

In particular, it returns UIViewNoIntrinsicMetric for the width whereas UIPageControl calculates a width based on the number of pages.

Without this, SMPageControl is not a drop in replacement for UIPageControl.

Variable dot sizes

As of today using variable dot sizes does not align properly (eg. current dot is bigger and so on). It seems dots are drawn (as per usual) left-aligned. Drawing dots centred-aligned is needed to be able to have variable dot sizes and still look good.

tapBehavior does not work in Swift 2.3?

I currently try to implement the SMPageControler into my Swift 2.3 Project.
Xcode 8 Final Version.

pageControl.tapBehavior = SMPageControlTapBehavior.Jump

When I touch the Controler, the image gets selected, but the Screen does not jump to the new ViewController.
Any ideas?

Single dot not visible on iOS 12

Hello, i have been using this lib for a while, and did not have any issue till now. I opened an app on iOS 12 and wherever i have one page in SMPageControl that page indicator (dot) is not visible, also it looks like even if i have more than one it is visible but less, like view is smaller.

I did some research and found this "hidesForSinglePage" property, but it is always false.

Anyone with same issue?

center current

Is there a way to "center" the current item? (within the self.view)

like let's say I have a PageController with 5 Views.
I want

| | = the window
i = the current item
. = items

bildschirmfoto 2016-09-17 um 14 58 26

is something like that possible? and how?
and please, if possible in swift code.
I've use pod to be able to use this framwork within my swift project.

Feature Addition: Resize Indicators to fit bounds

I am thinking of implementing a feature in SMPageControl that will resize the indicators when there are too many to fit in the bounds width. I was thinking it would be set on a boolean flag (defaulting to NO) like resizeIndicatorsToFitBounds. Then, a transform could be applied, or a recalculation of the sizing would be done if the sizeToFit bounds width > actual bounds width. Thoughts?

Option to remove image masks

I don't seem to find a public way to remove the image masks.

The app which I'm working on has rectangle images for indicators.

So changing the following line:

CGContextFillEllipseInRect(context, CGRectMake(centeredXOffset, yOffset, _indicatorDiameter, _indicatorDiameter));

to:

CGContextFillEllipseInRect(context, CGRectMake(centeredXOffset, yOffset, _indicatorDiameter, _indicatorDiameter));

did it for me.

Could you provide a public way of disabling image masks for ease of use?

Does not work with Carthage

Upon including the following:

github "Spaceman-Labs/SMPageControl"

in my Cartfile, I get the following:

*** Skipped building SMPageControl due to the error:
Dependency "SMPageControl" has no shared framework schemes for any of the platforms: iOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/Spaceman-Labs/SMPageControl/issues/new

Am I missing something?

iOS SDK 8 issue

Hi,

I been using your control for one of my project. Since I started using sdk 8 its been crashing my app.. The issue is in SMPageControl - - (void)_renderPages:(CGContextRef)context rect:(CGRect)rect

The error is thrown when we try to navigate the images.

The code that is throwing the error

yOffset = [self _topOffsetForHeight:image.size.height rect:rect];
CGFloat centeredXOffset = xOffset + floorf((_measuredIndicatorWidth - image.size.width) / 2.0f);
[image drawAtPoint:CGPointMake(centeredXOffset, yOffset)];
indicatorRect = CGRectMake(centeredXOffset, yOffset, image.size.width, image.size.height);

Not sure how to fix it. I ended up using the code in the else statement. Seems to be working for me for now

Thanks in advance

Strange new frame at the first dot

I use this code:

self.pageControl = [[SMPageControl alloc] initWithFrame:CGRectMake(110, 496, 100, 10)];
self.pageControl.numberOfPages = 6;
self.pageControl.currentPage = 0;
// green point
[self.pageControl setPageIndicatorImage:[UIImage imageNamed:@"page-dot.png"]];
//white large point
[self.pageControl setCurrentPageIndicatorImage:[UIImage imageNamed:@"page-dot-current.png"]];

[self.pageControl setImage:[UIImage imageNamed:@"page-signup-dot.png"] forPage:5];
[self.pageControl setCurrentImage:[UIImage imageNamed:@"page-signup-dot-current.png"] forPage:5];

After run and scrolling, the first dot became a whitish border.
2014-07-30 09 01 50

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.