Wednesday, October 7, 2026
HomeiOS Developmentios - Save button middle place and cargo it in view controller...

ios – Save button middle place and cargo it in view controller Loaded

[ad_1]

Hi guys sorry for my english, i´m working in app that’s able to transfer a bunch of buttons, every of them, on display screen with UIPanGestureRecognizer, save middle place (x,y) and tag in Core Knowledge.

When the app begins from zero and that i load place from Core Knowledge:

if let c = ButtonEntity.getButton(tag: self.tag)
    {
    DispatchQueue.foremost.asyncAfter(deadline: .now() + 0.5)
    {
            self.middle = CGPoint(x: CGFloat( c.xPoint ?? 0), y: CGFloat( c.yPoint ?? 0))
    }

That is from a customized UIButton Class and the buttons are positioned by default in a sure positions with auto structure

The issue is that in some circumstances some buttons return to their auto structure positions as a substitute of coreData middle place assigned on ViewLoaded

is there any answer or one other approach to do that ?
thanks

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments