Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set frame with STSSDKPlayerView #43

Open
idlycyme opened this issue Feb 16, 2017 · 0 comments
Open

Unable to set frame with STSSDKPlayerView #43

idlycyme opened this issue Feb 16, 2017 · 0 comments

Comments

@idlycyme
Copy link

母畫面:
xib 裡有個加了四邊constraint跟superview一樣大的STSSDKPlayerView (ib outlet),STSSDKPlayerView的superview為xib本身的view。

子畫面:在獨立的pip view controller中,加入由母畫面傳入的STSSDKPlayerView,給定大小位置(無constraint)
pan gesture:改變子畫面的center
display function:
{
....
self.pipView = view; // view's class is STSSDKPlayerView
//self.pipView.translatesAutoresizingMaskIntoConstraints = YES;
self.pipView.frame = [self pipFrameAtCorner:corner marginX:marginX marginY:marginY size:size];

[self.view addSubview:self.pipView];

}

pan gesture handler:
{
... compute new center ...
self.pipView.center = $new_center;
}

Issue:
無法指定子畫面位置與大小

測試:

  1. 將line 9的view由STSSDKPlayerView換成uiimage,行為正常。
  2. 將line 2所指母畫面xib,STSSDKPlayerView跟superview間(leading,trailing,top,bottom)constraints拿掉,行為正常。
  3. 將line 10的self.pipView.translatesAutoresizingMaskIntoConstraints = YES; unmark,行為正常。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant