How do I change the z index or stack order of UIView?

I would recommend looking in the UIView documentation, where are several methods listed for the manipulation of the order of subviews: bringSubviewToFront(_:) sendSubviewToBack(_:) removeFromSuperview() insertSubview(_:atIndex:) insertSubview(_:aboveSubview:) insertSubview(_:belowSubview:) exchangeSubviewAtIndex(_:withSubviewAtIndex:) In your situation, you could try: self.view.sendSubviewToBack(myGradientView) // self is your view controller in this case. Alternatively, because you created the myGradientView in IB, you could change … Read more

Understanding convertPoint:toView:

Every UIView has its own coordinates system. So if you have a UIView_1 that contains another UIView_2, they both have a point (10,10) within them. convertPoint:toView: allows the developer to take a point in one view and convert the point to another view coordinate system. Example: view1 contains view2. The top left corner of view2 … Read more

how to set a background image as colorWithPatternImage in swift

Refer to the UIColor documentation. In Swift, you have to call a convenience initializer. This is because in Swift, all Objective-C class methods which return an instance of their class become convenience initializers. Here’s how it looks in Swift: self.view.backgroundColor = UIColor(patternImage: UIImage(named: “background.png”)) + (UIColor *)colorWithPatternImage:(UIImage *)image returns a UIColor instance, so it will … Read more

Changing UIView size programmatically

If I understand correctly, you want to change the size of self.myview. However at no point you are setting the frame of it. Instead you are trying to call sendFrame: on the view controller and some search field. I’m surprised, that the former one didn’t give you a compiler error. Objective C CGRect newFrame = … Read more

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