Changeset 5041 for pjproject


Ignore:
Timestamp:
Mar 31, 2015 4:59:54 AM (9 years ago)
Author:
ming
Message:

Re #1782 (misc): Improve layout in ipjsua sample app, so it can display both preview and incoming video together.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/ios/ipjsua/ipjsuaAppDelegate.m

    r4848 r5041  
    238238            UIView *view = (__bridge UIView *)wi.hwnd.info.ios.window; 
    239239             
    240             if (view && ![view isDescendantOfView:parent]) { 
     240            if (view) { 
    241241                dispatch_async(dispatch_get_main_queue(), ^{ 
    242242                    /* Add the video window as subview */ 
    243                     [parent addSubview:view]; 
     243                    if (![view isDescendantOfView:parent]) 
     244                        [parent addSubview:view]; 
    244245                     
    245246                    if (!wi.is_native) { 
     247                        /* Resize it to fit width */ 
     248                        view.bounds = CGRectMake(0, 0, parent.bounds.size.width, 
     249                                                 (parent.bounds.size.height * 
     250                                                  1.0*parent.bounds.size.width/ 
     251                                                  view.bounds.size.width)); 
    246252                        /* Center it horizontally */ 
    247253                        view.center = CGPointMake(parent.bounds.size.width/2.0, 
Note: See TracChangeset for help on using the changeset viewer.