Skip to content

Commit

Permalink
Merge pull request Ramotion#27 from strivingboy/master
Browse files Browse the repository at this point in the history
convert to swift 1.2
  • Loading branch information
0ber committed Jun 8, 2015
2 parents 88898ce + a1de2dc commit fbcbd63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class RAMFrameItemAnimation: RAMItemAnimation {

let dict : NSDictionary = NSDictionary(contentsOfFile: path!)!

let animationImagesName = dict["images"] as Array<String>
let animationImagesName = dict["images"] as! Array<String>
createImagesArray(animationImagesName)

// selected image
Expand Down
8 changes: 4 additions & 4 deletions RAMAnimatedTabBarController/RAMAnimatedTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ class RAMAnimatedTabBarController: UITabBarController {
if let items = tabBar.items {
let itemsCount = tabBar.items!.count as Int - 1
var index = 0
for item in self.tabBar.items as [RAMAnimatedTabBarItem] {
for item in self.tabBar.items as! [RAMAnimatedTabBarItem] {

assert(item.image != nil, "add image icon in UITabBarItem")

var container : UIView = containers["container\(itemsCount-index)"] as UIView
var container : UIView = containers["container\(itemsCount-index)"] as! UIView
container.tag = index

var icon = UIImageView(image: item.image)
Expand Down Expand Up @@ -171,7 +171,7 @@ class RAMAnimatedTabBarController: UITabBarController {
var constranints = NSLayoutConstraint.constraintsWithVisualFormat(formatString,
options:NSLayoutFormatOptions.DirectionRightToLeft,
metrics: nil,
views: containersDict)
views: containersDict as [NSObject : AnyObject])
view.addConstraints(constranints)

return containersDict
Expand Down Expand Up @@ -215,7 +215,7 @@ class RAMAnimatedTabBarController: UITabBarController {

func tapHandler(gesture:UIGestureRecognizer) {

let items = tabBar.items as [RAMAnimatedTabBarItem]
let items = tabBar.items as! [RAMAnimatedTabBarItem]

let currentIndex = gesture.view!.tag
if selectedIndex != currentIndex {
Expand Down

0 comments on commit fbcbd63

Please sign in to comment.