chililabs / chipagecontrol Goto Github PK
View Code? Open in Web Editor NEWA set of cool animated page controls written in Swift to replace boring UIPageControl. Mady by @ChiliLabs - https://chililabs.io
License: MIT License
A set of cool animated page controls written in Swift to replace boring UIPageControl. Mady by @ChiliLabs - https://chililabs.io
License: MIT License
If the number of pages are maximum like 30-40 then it goes out of the screen not able to see a page control
is it possible if there is the number of pages are maximum then change width according to that?
Hi,
I am trying to use the CHIPageControlAji but in this line:
pageIndicator.borderWidth = 1 // this should set the indicator border, right?
I get this error:
Ambiguous use of 'borderWidth'
I am using :
Xcode 8.3.1
pod 'CHIPageControl', ' ~> 0.1.3'
pod 'Material', '~> 2.6.3'
First of all, thanks for the marvelous package. I wanted to use the Jalapeno
package as a vertical page control. For that reason, I applied the transform which is pageControl.transform.rotated(by: .pi/2)
to the view and then I used auto layout for positioning but it didn't work as expected.
Can you fix this issue?
Hey,
Can you adjust CHIBasePageControl so it can be used as super class outside CHIPageControl framework? Right now, some methods cannot be overridden (like updateNumberOfPages and update(for progress:)) and others cannot be used outside, all because of internal access level.
When numberOfPages = 1
and progress = 0
, func update(for progress: Double)
throws exception: CALayerInvalidGeometryCALayer, position contains NaN: [nan 0]
.
It should be possible to provide subspecs so that only the desired page control(s) are imported.
hello
I Found in the readme file is written in 9.0, but in the podspec file is written 8.0, I can not determine in the end which is correct.
The alpha of the inactive indicators is too much, is there any way to reduce it ?
Its impossible to set background color for CHIPageControlAji, I tried to achieve this using cornerRadius but active circle in this case is always smaller than inactive and dont overlap it
SPM support please
Your lib is so cool :)) But can you support more animation like zoom (zoom at current circle).
Thanks !
It will be good to have name of each class below animation that you have on github README.md.
Now I need to run every single class to check what effect it produces ;)
Thanks, KR
I think it would be great to have different colours for the dot border and the dot fill color.
Hello. I have found one interesting thing. While i scroll something on screen with your page control animation doesn't work and it starts only after scrolling is stopped. I have tried change mode for display link to .commonModes
and it have worked perfectly.
internal func setupDisplayLink() {
self.displayLink = CADisplayLink(target: self, selector: #selector(updateFrame))
self.displayLink?.add(to: .current, forMode: .defaultRunLoopMode)
}
Could you check it and update pod. Thank you.
CHIBasePageControlDelegate not working on start touch progress view
Correct me if I'm wrong but aren't you missing cleanup for CADisplayLink
?
Shouldn't you at least .invalidate()
it (probably remove from runloop also) before CHIBasePageControl
is deallocated? Otherwise you risking of calling method on deallocated CHIBasePageControl
When I use set(progress:animated:)
method, the layout of the CHIPageControlFresno
is broken ?
↓Here is my company tech blog about CHIPageControl.
http://dev.classmethod.jp/smartphone/chipagecontrol/
Is it possible to get the touch event in any of the pages of the control?
I'm thinking on implement it, but first I wanted to know if the behavior exists or not.
Thanks!
Hi, I have a problem with CHIPageControlJaloro. I need to set tint color with opacity 0.4, but tint color returns opacity 1.0. How can I do this?
The package has been updated recently with SPM support (#79 and #78), but I get errors with it.
I am on Xcode 13.0, using the built in Swift Package Manager, and specify the master branch in rules when adding the package.
When I import the module in my code, I receive the error
"No such module 'CHIPageControl'"
Additionally, I receive a warning which might be related
found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target /Users/******/Library/Developer/Xcode/DerivedData/*****-aheljstdlofofhcbswicoezhhaqd/SourcePackages/checkouts/CHIPageControl/CHIPageControl/Info.plist
I added CHIPageControlAji in storyboard. In my viewController, I appointed it delegate. And in the extension, I signed the CHIBasePageControlDelegate protocol. I've implemented a method didTouch but I have the following mistake
Type 'OnboardingContainerController' does not conform to protocol 'CHIBasePageControlDelegate'
What could be the problem? How can it be solved?
Hello,
I am trying to integrate this POD in my Objective-C.
I am facing some issues.
we have to convert this to bridging header in XCode 8.0
Can you help me please ?
Hi,
Could you please add Swift 5 support?
Thank you
After implementing UIView with custom class of CHIPageControlAji or some other CHIPageControl class, the App crashes. Something's wrong with designable view and I even got fatal error saying trying to access nil variable.
You can avoid this issue if you add UIView in xib as a container which will than be used in code like:
var customPageControl: CHIBasePageControl?
customPageControl = CHIPageControlAji(frame: CGRect(x: 0, y:0, width: 100, height: 20)) containerViewForPageControl.addSubview(customPageControl)
`override func viewDidLoad() {
super.viewDidLoad()
splashScrollView.contentSize = CGSize(width: screenSize.width*4, height: screenSize.height)
splashScrollView.isPagingEnabled = true
splashScrollView.delegate = self
self.view.addSubview(splashScrollView)
pageControl = CHIPageControlAji(frame: CGRect(x: (screenSize.width/2)-100, y: screenSize.height-90, width: 200, height: 20))
pageControl.numberOfPages = 4
pageControl.radius = 4
pageControl.tintColor = colorWhite
pageControl.padding = 6
self.view.addSubview(pageControl)
self.view.setNeedsUpdateConstraints()
}
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
if (scrollView == splashScrollView) {
let total = scrollView.contentSize.width - scrollView.bounds.width
let offset = scrollView.contentOffset.x
let percent = Double(offset / total)
let progress = percent * Double(4 - 1)
pageControl.set(progress: Int(progress), animated: true)
}
}`
You can make CHIPageControlChimayo like CHIPageControl + Chimayo
make Chimayo like a delegate object conforming a delegate like
protocol XXXDelegate {
func updateNumberOfPages(_ count: Int)
func update(for progress: Double)
func didLayoutSubviews()
func sizeThatFits(_ size: CGsize) -> CGSize
}
能自定义默认颜色和选中颜色不,我看只能设置tintColor
I have following error on my storyboard that breaks the view for view controller that I've used page control. it shows all my views as white blank views on the storyboard for related view controller.
Profile.storyboard: error: IB Designables: Failed to render and update auto layout status for ProfileDetailController (mG7-Ex-hLd): dlopen(CHIPageControl.framework, 1): no suitable image found. Did find:
CHIPageControl.framework: required code signature missing for 'CHIPageControl.framework'
What should I do to fix it? it is so annoying. I am using latest version.
Hello,
Have successfully added this control to an Obj C project but am unable to see the func set(progress: Int, animated: Bool) from my class.
Is this a limitation or is there workaround to get the control to animate?
how can i dicrease dots spacing
Has crashing issues in v0.1.7 using swift 4.2
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CHIPageControl.WeakProxy updateFrame]: unrecognized selector sent to instance 0x1c4014240
pageControl.currentPage = 0
currentPage is not set as 0, it show Error: Cannot assign to property: 'currentPage' is a get-only property
Hello! Searching for ideas to animate changing element in CHIPageControlJaloro like in instagram stories or others. Any concepts or ides to work with?
Is it possible to handle big number of pages, so active indicator will be always visible?
In case width of control is less than required by the number of pages, then active indicator keeps moving out of bounds.
I would tell that it should handle this case, and if active indicator is "near" bounds, then it should move all unactive indicators to the left/right, and active indicator should have static positions.
How to increase size of touch area of each dot?
Because i can't able to touch properly.
Please suggest me some solution.
I want to increase size of dot and height and width of the horizontal line. Help me in the framework.
-pie being ignored. It is only used when linking a main executable
UIPageControl supports RTL mode. But this PageControl does not.
Hey, guys! Awesome lib!
I was wondering if there is a way to make CHIPageControl circular? I mean, some approach for the case, when I set first current page after the last with proper portal-like animation?
After implementing CHIPageControl, I cannot access
pageControl.enableTouchEvents = true
also there is no CHIBasePageControlDelegate
delegate available
Hi,
Is there any chance to use 2 different frame for page controls. For example I'm using CHIPageControlJaloro And I want to use different width for current element.
Also I Know there is a variable which name is active in CHIPageControlJaloro. But we can't access it outside of pod.
[!] Unable to find a specification for CHIPageControl (~> 0.0.1)
I get this error when trying to install the pod
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.