 	}
 	
 	private func redrawComponents() {
+		redrawButtons()
+		
+		if buttons.count > 0 {
+			moveToIndex(selectedIndex, animated: false, moveScrollView: false)
+		}
+		
+		if scrollView != nil {
+			scrollView!.contentSize = CGSizeMake(scrollView!.frame.size.width * CGFloat(buttons.count), scrollView!.frame.size.height)
+			
+			for i in 0..<views.count {
+				views[i].frame = CGRectMake(scrollView!.frame.size.width * CGFloat(i), 0, scrollView!.frame.size.width, scrollView!.frame.size.height)
+			}
+		}
+	}
+	
+	private func redrawButtons() {
 		if buttons.count == 0 {
 			return
 		}

			button.setTitleColor((i == selectedIndex) ? selectedTextColor : textColor, forState: .Normal)
			button.titleLabel?.font = (i == selectedIndex) ? selectedFont : font
		}
		
		moveToIndex(selectedIndex, animated: false, moveScrollView: false)
		
		if scrollView != nil {
			scrollView!.contentSize = CGSizeMake(scrollView!.frame.size.width * CGFloat(buttons.count), scrollView!.frame.size.height)
			
			for i in 0..<views.count {
				views[i].frame = CGRectMake(scrollView!.frame.size.width * CGFloat(i), 0, scrollView!.frame.size.width, scrollView!.frame.size.height)
			}
		}
	}
	
	func buttonSelected(sender: UIButton) {

			
			let width = self!.frame.size.width / CGFloat(self!.buttons.count)
			let button = self!.buttons[index]
			
			self?.redrawButtons()
			
			if self!.indicatorSizeMatchesTitle {
				let string: NSString? = button.titleLabel?.text as NSString?
