I am writing some code for my home screen for a new app I am working on. On the home screen I have a GIF image running in the background with a FB(Facebook) login on the front screen.
My issue is that I am trying to run auto-layout programmatically and am trying to center as well as stretch my GIF file to make it through out the entire screen. Here is the current code I have so far in regards to the sizing:
var webViewBG = UIWebView(frame: CGRectMake(0, 0, self.view.bounds.size.width, 1250))
webViewBG.loadData(gif, MIMEType: "image/gif", textEncodingName: nil, baseURL: nil)
webViewBG.userInteractionEnabled = false;
self.view.addSubview(webViewBG)
I am looking to get this to center on iPhone 4s - 6+, however I am unsure if this is related to the GIF size or if I am using the wrong code by implementing CGRectMake
in the code.