Commits

Anonymous committed 1dcf6c9

add animation for webview

  • Participants
  • Parent commits 9b31160

Comments (0)

Files changed (1)

File MPlayerX/ControlUIView.m

 
 	[menuShowMediaInfo setEnabled:NO];
   
+  [webView setWantsLayer:YES];
   [webView setFrameLoadDelegate:self];
   [webView setPolicyDelegate:self];
   [webView setHidden:YES];
     //   return;
     if ([shareUriCurrent length] == 0)
     {
+      NSRect dstFrame = [webView frame];
+      NSRect srcFrame;
+      srcFrame.origin.x = dstFrame.origin.x + dstFrame.size.width;
+      srcFrame.origin.x = dstFrame.origin.y + dstFrame.size.height;
+      srcFrame.size.width = 0;
+      srcFrame.size.height = 0;
+      [webView setFrame:srcFrame];
+      [webView setHidden:NO];      
+      [[webView animator] setFrame:dstFrame];
+      
       NSString* mediaPath = ([playerController.lastPlayedPath isFileURL])?([playerController.lastPlayedPath path]):([playerController.lastPlayedPath absoluteString]);
       shareUriCurrent = [ssclThread shareMovie:mediaPath];
       if ([shareUriCurrent length] == 0)