Firstly i add the horizontalScrollView to UIView seen no problem. But Added to table view cell does not show the last items and scroll view width is beyond the container view.
here is my code...
let horizontalScrollView = ASHorizontalScrollView(frame:CGRectMake(0, 30, containerView.frame.size.width , 150))
horizontalScrollView.backgroundColor = UIColor.blueColor() //add color for testing
horizontalScrollView.leftMarginPx = 30
horizontalScrollView.miniMarginPxBetweenItems = 15
horizontalScrollView.miniAppearPxOfLastItem = containerView.frame.size.width-(200+30+50)
horizontalScrollView.uniformItemSize = CGSizeMake(200, 150)
//This must be called after changing any size or margin property of this class to get acurrate margin
horizontalScrollView.setItemsMarginOnce()
for nub in 1...7{
if let addView = NSBundle.mainBundle().loadNibNamed("ScrollViewController", owner: ScrollViewController(), options: nil)[0] as? ScrollView{
addView.titleLable.text = "\(nub)"
horizontalScrollView.addItem(addView)
}
}
containerView.addSubview(horizontalScrollView)
Firstly i add the horizontalScrollView to UIView seen no problem. But Added to table view cell does not show the last items and scroll view width is beyond the container view.
here is my code...