我来自Android,我在IOS中遇到了很多麻烦.我需要像电影一样制作滚动菜单.我使用下面的代码:
rol = scroll_view.contentOffset.y;
timer = [NSTimer scheduledTimerWithTimeInterval:.02 target:self selector:@selector(timer_rol) userInfo:nil repeats:YES];
-(void)timer_rol{
[scroll_view setContentOffset:CGPointMake(0,rol) animated:YES];
rol++;
}
Run Code Online (Sandbox Code Playgroud)
此代码工作正常,但当用户交互向上或向下滚动时,视图返回到之前的位置(rol的值).问题是,如何在滚动后获得当前内容位置
我已经尝试过这些代码,但没有人工作:
CGPoint point = [scroll_view contentOffset];
rol = r.y +1;
-(void) handleGesture:(UIGestureRecognizer *) sender{}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {}
-(void)scrollViewDidScroll:(UIScrollView *)scrollView {}
Run Code Online (Sandbox Code Playgroud)
有人可以帮帮我吗?
有一种方法可以在textView上添加某些单词的链接,当我单击该单词时,会打开一个对话框.
例如:TextView - > Word A - Word B - Word C.
当我单击Word A时,显示带有一些选项的对话框,当我单击Word C时,打开另一个带有其他选项的对话框.
我检查了这个链接,但我的问题不合适.
有人可以帮忙吗?
android ×1
dialog ×1
hyperlink ×1
ios ×1
objective-c ×1
position ×1
textview ×1
uiscrollview ×1