Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label text is not completely shown. #40

Open
kwstasna opened this issue Jan 29, 2017 · 3 comments
Open

Label text is not completely shown. #40

kwstasna opened this issue Jan 29, 2017 · 3 comments

Comments

@kwstasna
Copy link

Report a bug

What did you do?

 public func segmentioOptions() -> SegmentioOptions {
        
        return SegmentioOptions(backgroundColor: .lightGray, maxVisibleItems: 4, scrollEnabled: true, indicatorOptions: segmentioIndicatorOption(), horizontalSeparatorOptions: nil, verticalSeparatorOptions: segmentioVerticalSperator(), imageContentMode: .scaleAspectFit, labelTextAlignment: NSTextAlignment.left, labelTextNumberOfLines: 1, segmentStates: segmentioStates(), animationDuration: 0.5
        )
        
    }
    
    fileprivate func segmentioStates() -> SegmentioStates {
        
        return SegmentioStates(
            defaultState: SegmentioState(
                backgroundColor: .lightGray,
                titleFont: UIFont.systemFont(ofSize: 8),
                titleTextColor: .white
            ),
            selectedState: SegmentioState(
                backgroundColor: .lightGray,
                titleFont: UIFont.systemFont(ofSize: 8),
                titleTextColor: .white
            ),
            highlightedState: SegmentioState(
                backgroundColor: UIColor.lightGray.withAlphaComponent(0.6),
                titleFont: UIFont.boldSystemFont(ofSize: 8),
                titleTextColor: .white
            )
        )
        
    }
    
    fileprivate func segmentioVerticalSperator() -> SegmentioVerticalSeparatorOptions {
        return SegmentioVerticalSeparatorOptions(
            ratio: 1, // from 0.1 to 1
            color: .black
        )
    }
    
    fileprivate func segmentioIndicatorOption() -> SegmentioIndicatorOptions {
        return SegmentioIndicatorOptions(
            type: .bottom,
            ratio: 1,
            height: 5,
            color: .red
        )
    }

What did you expect to happen?

This image shows what i expect to happen.

http://i.imgur.com/LUVMYQm.png

What happened instead?

Except the background color which is for test only. My only issue is about the label text it has to be like the image on "what i expect to happen"

http://i.imgur.com/Gb9NLPy.png

Your Environment

  • Version of the component: 2.1 (updated the pods spec and pod update at 29/1/2017)
  • Swift version: 3.01
  • iOS version: 10.1
  • Device: iPhone SE
  • Xcode version: Version 8.1 (8B62)
  • If you use Cocoapods:

Stack

   CocoaPods : 1.1.0.rc.2
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems : 2.6.6
        Host : Mac OS X 10.12.1 (16B2327e)
       Xcode : 8.1 (8B62)
         Git : git version 2.9.3 (Apple Git-75)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ aa500a428f80c8e56a48e94a019fb8b59c74d79a
               master copy - https://github.com/CocoaPods/Specs.git @ aa500a428f80c8e56a48e94a019fb8b59c74d79a

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.1.1
cocoapods-try         : 1.1.0

Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Testy' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Testy

   	pod 'Alamofire', '~> 4.0’
	pod 'Fabric'
	pod 'Crashlytics'
	pod 'Kingfisher', '~> 3.0'
	pod 'Siren'
	pod 'Segmentio', '~> 2.1'
	pod 'DeviceKit', '~> 1.0'
	pod 'UIColor_Hex_Swift', '~> 3.0.2'
	pod 'DropDown'
	pod 'Eureka', '~> 2.0.0-beta.1'
	pod 'PasswordTextField'
	pod 'FacebookCore'
	pod 'FacebookShare’
	pod 'FBNotifications'
	pod 'SkyFloatingLabelTextField', '~> 2.0.0'
	pod 'PopupDialog', '~> 0.5'
	pod ‘IQKeyboardManagerSwift’

end

Project that demonstrates the bug

Its just a simple setup.

@Gurbo
Copy link

Gurbo commented Feb 1, 2017

@kwstasna I've faced this problem too, the solution is to use version 2.1.1. not 2.1.2
Here is the code solution Gurbo@370ca73

@kwstasna
Copy link
Author

kwstasna commented Feb 1, 2017

@Gurbo yes when i run pod install i see that Using Segmentio (2.1.2) how can i install 2.1.1 ???
Thanks for the answer !!

@Gurbo
Copy link

Gurbo commented Feb 3, 2017

@kwstasna i've just downloaded 2.1.2, changed source code and pushed it to my repository. Don't know how to download 2.1.1 @dimazen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants