yervandsar / smoothtab Goto Github PK
View Code? Open in Web Editor NEWSmooth customizable tabs for iOS apps.
License: Other
Smooth customizable tabs for iOS apps.
License: Other
SmoothTabView has tapItem(at:)
to programmatically make some tab selected.
However, attempt to select the very first one (at index 0) gives no results. Most probably because of the if oldValue != selectedSegmentIndex
check in selectedSegmentIndex
's didSet
As a workaround have to do this:
smoothTabView.tapItem(at: 1)
smoothTabView.tapItem(at: 0)
Found that while it is possible to set all needed parameters to make tabs evenly take the width of the screen. However, this only works for a screen with fixed size.
As a workaround it is possible to detect the device type and change itemsMargin
, but it would be cool if SmoothTabView
was able to to place its tabs evenly in any screen.
Also I will need to dynamically hide/show some of the tabs, so that hardcoding itemsMargin
won't work work in my case.
Hi Team,
When I ran the app it is not selected first index default showing only all images.
Hi Team,
I have an requirement, I am trying to give different images in Tab section, As I saw in Example code it is having only single image, Can you please help me Where I can put the code exactly.
I took the code:
let instagram_item = OurTeams.allTeams.map { SmoothTabItem(
title: $0.rawValue,
image: $0.instagram_image,
selectedImage: $0.selected_instagram_Image,
tintColor: UIColor(red: 96/255, green: 197/255, blue: 227/255, alpha: 1)
)
}
let facebook_item = OurTeams.allTeams.map { SmoothTabItem(
title: $0.rawValue,
image: $0.facebook_image,
selectedImage: $0.selected_facebook_Image,
tintColor: UIColor(red: 96/255, green: 197/255, blue: 227/255, alpha: 1)
)
}
let twitter_item = OurTeams.allTeams.map { SmoothTabItem(
title: $0.rawValue,
image: $0.twitter_image,
selectedImage: $0.selected_twitter_Image,
tintColor: UIColor(red: 96/255, green: 197/255, blue: 227/255, alpha: 1)
)
}
var items: [SmoothTabItem] = [instagram_item, facebook_item, twitter_item]
But it is throwing an error: Cannot convert value of type '[SmoothTabItem]' to expected element type 'SmoothTabItem'
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.