开发者

Dynamic attached UILabel is not moving

开发者 https://www.devze.com 2023-01-02 15:45 出处:网络
I have attached a UILabel to view. Now i want to move that label but its not working. here is my code

I have attached a UILabel to view. Now i want to move that label but its not working. here is my code

UILabel *tick = (UILabel *)[self.view viewWithTag:tag];

CGRect frame = tick.frame;

frame.origin.x = newVal;

frame.origin.y = newVal;

I can change text value of the UILabe开发者_Python百科l tick but how can i move it here and there?


You need to assign frame back to tick to change it.

tick.frame = frame;
0

精彩评论

暂无评论...
验证码 换一张
取 消