Comments (8)
Quick workaround:
ScrollMenu.swift
` override public func layoutSubviews() {
super.layoutSubviews()
layoutContent()
let contentOffsetX = bounds.width * CGFloat(currentPage)
setContentOffset(CGPoint(x: contentOffsetX, y: contentOffset.y), animated: false)
}`
We need to store 'currentPage' - maybe good idea to make it public.
@serejahh: Feedback? :)
from colormatchtabs.
@serejahh: Oh didn't see your fix. Thought you just closed the issue.
Your latest fix caused wrong index after rotation.
- Portrait - Index 2 selected
- Rotate
- Landscape - Index 2 still selected
- Rotate
- Portrait - Index 3 selected !!!
Haven't seen the issue with my workaround though... Going to test a lil bit more
from colormatchtabs.
Please check if your fix works better. Then I'll merge it
from colormatchtabs.
It seems it works, but when you tap on a tabbar item, a page doesn't change and you can't swipe
from colormatchtabs.
yes you are correct - swipe is broken with my workaround but correct index is shown :(
from colormatchtabs.
public var indexOfVisibleItem: Int { if bounds.width > 0 { return Int(round(contentOffset.x / bounds.width)) } return 0 }
is returning wrong index after 2nd orientation change. So 'previousIndex' will be messed up.
Maybe related to "Out Of Range" bug ?
from colormatchtabs.
Seems to be true. When a device is just been rotated from landscape to portrait, bounds
is for portrait, but contentSize
and contentOffset
are for landscape
from colormatchtabs.
Still getting issue in landscape mode
from colormatchtabs.
Related Issues (20)
- Content not visible HOT 1
- Tab bar is hiding when openin another UIViewController
- Index out of range to this , when run the application let toLabel = labels[toIndex], in moveHighlighterView method, in ColorTabs.swift HOT 1
- Logo Design: ColorMatchTabs
- Tab bug when swipe the UITableViewController HOT 1
- viewWillAppear have been not called in contentView
- Crash when swipe content view.
- Multiple tab bar button problem.. HOT 2
- Not able to install this pod HOT 1
- Is there any way to add parallax header above the tabs?
- Tabs are overlapped by navigationBar even navigationBar.isTranslucent = false;
- tab bar to bottom
- Property cannot be marked @IBInspectable because its type cannot be represented in Objective-C
- I want to set this top tab bar in bottom tabbar HOT 5
- How to reduce space between icon and UILabel?
- How to change language
- By default tab selection index is 1 instead of 0 HOT 1
- Tabbar at bottom with navigation bar at top
- the view is over safeArea how to fix it!
- The bar is under iPhone noutch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colormatchtabs.