标签: ios objective-c
我正在尝试在0和时间间隔之间获得一个随机时间点,但我收到此错误:
将NSTimeInterval(又名'double')初始化为不兼容类型'id'的参数
这是我的代码:
NSTimeInterval time=[timer lenghtOfTime]; NSTimeInterval newTime = [random NextDouble:0.0 :time]; // <---here is were I'm getting the error.