Using Autolayout Visual Format with Swift?

this works for me with no error: let bar:[AnyObject]! = NSLayoutConstraint.constraintsWithVisualFormat( nil, options: NSLayoutFormatOptions(0), metrics: nil, views: nil) update the line above may not be compiled since the 1st and 4th parameters cannot be optionals anymore. syntactically those have to be set, like e.g. this: let bar:[AnyObject] = NSLayoutConstraint.constraintsWithVisualFormat(“”, options: NSLayoutFormatOptions(0), metrics: nil, views: [“”: … Read more

Centering a view in its superview using Visual Format Language

Currently, no, it doesn’t look like it is possible to center a view in the superview using only VFL. It is, however, not that difficult to do it using a single VFL string and a single extra constraint (per axis): VFL: “|-(>=20)-[view]-(>=20)-|” [NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:view.superview attribute:NSLayoutAttributeCenterX multiplier:1.f constant:0.f]; One would think that you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)