Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func carousel(carousel: iCarousel, viewForItemAtIndex index: Int, reusingView view: UIView?) -> UIView {
- let tempView = UIView(frame: CGRect(x: 0, y: 0, width: 200, height: 200)) //Adding the buttons
- if index == 0 {
- let actua = UIButton(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
- actua.setTitle("Actua", forState: .Normal)
- actua.setTitleColor(UIColor.blackColor(), forState: .Normal)
- let HeistLeeftFoto = UIImage.init(named: "HeistLeeft")
- actua.setBackgroundImage(HeistLeeftFoto!, forState: .Normal)
- tempView.addSubview(actua)
- }
- else if index == 1 {
- let shoppen = UIButton(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
- shoppen.setTitle("Shoppen", forState: .Normal)
- shoppen.setTitleColor(UIColor.whiteColor(), forState: .Normal)
- let BergStraatFoto = UIImage.init(named: "Bergstraat")
- shoppen.setBackgroundImage(BergStraatFoto!, forState: .Normal)
- tempView.addSubview(shoppen)
- }
- actua.addTarget(self, action: ViewController.pushActua, forControlEvents: UIControlEvents.TouchUpInside)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement