I was developing a iPhone application in which some value has been writt开发者_运维技巧en down on UILable or UIButton. I want to ask that how can i drag these control to another location.
Please provide me some example of iPhone for this.
Can it is possible to drag these control into UITableView and then save UITableView values ??
Thanks in Advance.
You can do this logically.
Think you have an table view at particular co-ordinates in view. and you have a label with some text then you can move that label by using Touch Delegate methods.
touchesMoved
and the use
touchesEnd
for you logic,here you can save that label text in your data source array from where you display the table content and use [YourTabl reloadData]; and Finish that label presence.
I think it makes sense.
Yes you can drag any UIView. Just change the center of your view in
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
精彩评论