I'm making an iOS app using xcode 6 and swift. I'm using TokBox for live videochat. So far it is working fine. My only issue is the position of the camera view. I have tried to put the view inside a view container, but that doesn't seem to solve my issues. Right now i have hardcoded the position of the camera to fit an iPhone 4. Is there a way to put it inside a container and then use autolayout afterwards?
func PublishToSession()
{
Publisher = OTPublisher(delegate: self)
var Error : OTError?
Session?.publish(Publisher, error: &Error)
if let error = Error
{
//Some message
}
view.addSubview(Publisher!.view)
Publisher!.view.frame = CGRect(x: 0, y: PubVideoHeight, width: PubVideoWidth, height: PubVideoHeight)
}