ViewPager-Swift
ViewPager-Swift copied to clipboard
App Got Crash
i have used this library . My App Got crashed in
fileprivate func setupBasicTab(condition:SetupCondition, options:ViewPagerOptions, tab:ViewPagerTab) {
switch condition {
case .fitAllTabs:
buildTitleLabel(withOptions: options, text: tab.title)
titleLabel?.frame = CGRect(x: 0, y: 0, width: self.frame.size.width, height: self.frame.size.height)
case .distributeNormally:
buildTitleLabel(withOptions: options, text: tab.title)
// Resetting TabView frame again with the new width
let currentFrame = self.frame
let labelWidth = titleLabel!.intrinsicContentSize.width + options.tabViewPaddingLeft + options.tabViewPaddingRight
let newFrame = CGRect(x: currentFrame.origin.x, y: currentFrame.origin.y, width: labelWidth, height: currentFrame.height)
self.frame = newFrame
// Setting TitleLabel frame
titleLabel?.frame = CGRect(x: 0, y: 0, width: labelWidth, height: currentFrame.height)
}
self.addSubview(titleLabel!)
}.
My live app crashed when I used the library, please resolve it .