我想在简单的UI中在转换之间创建软动画:



移动的视图

当调用scrollToPoint: for move view指向该过渡没有动画时.我是Cocoa编程的新手(iOS是我的背景).我不知道如何正确使用.animator或NSAnimationContext.
我也读过核心动画指南,但没有找到解决方案.
源可以在Git Hub存储库上访问
请帮忙 !!!
我想添加UISlider到UIView添加到我的UIAlertController一本容易些,但我不能确定的方法.在Objective C中你会打电话addSubview但我不确定它在swift中是什么.
//UIViewController.alertReminden(timeInterval)
var refreshAlert = UIAlertController(title: "Reminder", message: "Set a reminder for the bus in \(self.timeInterval) minutes.", preferredStyle: UIAlertControllerStyle.Alert)
refreshAlert.addAction(UIAlertAction(title: "Ok", style: .Default, handler: { (action: UIAlertAction!) in
Alarm.createReminder("Catch the Bus",
timeInterval: NSDate(timeIntervalSinceNow: Double(self.timeInterval * 60)))
}))
refreshAlert.addAction(UIAlertAction(title: "Cancel", style: .Cancel, handler: { (action: UIAlertAction!) in
println("Handle Cancel Logic here")
}))
var view = UIViewController();
var myFrame = CGRectMake(10.0, 10.0, 250.0, 25.0)
var slider = UISlider(frame: myFrame)
slider.minimumValue = 1
slider.maximumValue …Run Code Online (Sandbox Code Playgroud)