# CustomUI in swift project

**URL:** <https://devforum.zoom.us/t/customui-in-swift-project/5665>\
**Category:** iOS\
**Created:** [August 23, 2019, 10:06pm UTC](https://devforum.zoom.us/t/customui-in-swift-project/5665 "2019-08-23T22:06:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssaylanc](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ssaylanc/32/9765_2.png) [@ssaylanc](https://devforum.zoom.us/u/ssaylanc)\
**Post date:** [August 23, 2019, 10:06pm UTC](https://devforum.zoom.us/t/customui-in-swift-project/5665/1 "2019-08-23T22:06:35Z")

</div>

I successfully impletemented Zoom SDK in my project. I can start and join meetings.

I want to use my own custom UI for my project. So I followed the documentation, meeting starts but I can’t see the custom ui, the delegate function `onInitMeetingView` are not called.

1. In my MainViewController:

```auto
class MainViewController: MobileRTCCustomizedUIMeetingDelegate {

     func startMeeting() {
        //enable customUI as document stated
        guard let ms = MobileRTC.shared()?.getMeetingSettings() else {return}
        ms.enableCustomMeeting = true
        // My api call function to start the meeting, this is working with the default UI
        startMyMeeting()
     }

    // delegate functions:
     func onInitMeetingView() {
            let storyboard = UIStoryboard(name: "Zoom", bundle: Bundle.main)
            let vc = storyboard.instantiateInitialViewController()! as! CustomInstantMeetingViewController
            self.customMeetingVC = vc
            addChild(self.customMeetingVC!)
            customMeetingVC!.view.frame = self.view.bounds
            view.addSubview(customMeetingVC!.view)
            customMeetingVC!.didMove(toParent: self)
        }
        
        func onDestroyMeetingView() {
            self.customMeetingVC?.willMove(toParent: nil)
            self.customMeetingVC?.view.removeFromSuperview()
            self.customMeetingVC?.removeFromParent()
            self.customMeetingVC = nil
        }
}

```

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 23, 2019, 11:20pm UTC](https://devforum.zoom.us/t/customui-in-swift-project/5665/2 "2019-08-23T23:20:05Z")

</div>

Hi ssaylanc,

Thanks for using Zoom SDK. Are you getting any errors? Or everything is working fine (the meeting has started), but just the UI does not show up? May I inquire which SDK version are you using?

Thanks!

---

<div class="post-metadata">

**Author:** ![ssaylanc](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ssaylanc/32/9765_2.png) [@ssaylanc](https://devforum.zoom.us/u/ssaylanc)\
**Post date:** [August 24, 2019, 6:51am UTC](https://devforum.zoom.us/t/customui-in-swift-project/5665/3 "2019-08-24T06:51:53Z")

</div>

Hi Carson,

Version : v4.4.55130.0712

I don’t get any errors, meeting has started but Custom UI did not displayed.  
I set tracepoints to onInitMeetingView and onDestroyMeetingView, they are not getting called.

Edit: I managed to launch my customUI with assigning:

```
guard let ms = MobileRTC.shared()?.getMeetingService() else {return}
ms.delegate = self

```

I have the host and the participant, but I can’t get the videoView display the participant and the host.

`@IBOutlet weak var participantView: MobileRTCVideoView!`

```
func onSinkMeetingActiveVideo(_ userID: UInt) {
        showAttendeeVideo(videoView: participantView, withUserId: userID)
}

func showAttendeeVideo(videoView: MobileRTCVideoView, withUserId userID: UInt) {
       
        videoView.showAttendeeVideo(withUserID: userID)
        
        guard let ms = MobileRTC.shared()?.getMeetingService() else {return}
        let size: CGSize = (ms.getUserVideoSize(userID))

        if __CGSizeEqualToSize(size, .zero) {
            return
        }
        videoView.setVideoAspect(MobileRTCVideoAspect_PanAndScan)
    }
```

---

<div class="post-metadata">

**Author:** ![ssaylanc](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ssaylanc/32/9765_2.png) [@ssaylanc](https://devforum.zoom.us/u/ssaylanc)\
**Post date:** [August 24, 2019, 2:37pm UTC](https://devforum.zoom.us/t/customui-in-swift-project/5665/4 "2019-08-24T14:37:02Z")

</div>

Hi Carson,

I did manage to get the attendee’s videoView visible. Bu I couldn’t find how to activate local preview. For Android SDK there is `addPreviewVideoUnit. How can I activate local preview for iOS?

Edit1: It seems that there is bug, when a meeting started with using ZAK video muted by default.

Edit2: I tried setting videoView to class MobileRTCPreviewVideoView. But no video displayed on the video.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 27, 2019, 2:01am UTC](https://devforum.zoom.us/t/customui-in-swift-project/5665/5 "2019-08-27T02:01:38Z")

</div>

Hi ssaylanc,

Thanks for the reply. For showing the active video view, you may refer to the implementation here:

- [https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/VideoViewController.m](https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/VideoViewController.m)
- [https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/CustomMeetingViewController.m#L190](https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/CustomMeeting/CustomMeetingViewController.m#L190)

The video muted by default is a known issue and we will fix that in the next release, which is coming very soon.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 3, 2020, 8:06am UTC](https://devforum.zoom.us/t/customui-in-swift-project/5665/6 "2020-06-03T08:06:58Z")

</div>

Hi,  
I am working on zoom iOS swift. I need help with zoom custom meeting swift code. We have already integrated start ans join meeting. Now we want custom meeting ui and share screen functionality.

can anyone help with that?

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 3, 2020, 8:07am UTC](https://devforum.zoom.us/t/customui-in-swift-project/5665/7 "2020-06-03T08:07:43Z")

</div>

@ssaylanc

Hi,  
I am working on zoom iOS swift. I need help with zoom custom meeting swift code. We have already integrated start ans join meeting. Now we want custom meeting ui and share screen functionality.  
can anyone help with that?

thanks

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [June 3, 2020, 10:37am UTC](https://devforum.zoom.us/t/customui-in-swift-project/5665/8 "2020-06-03T10:37:29Z")

</div>

Hi @eldhose.m,

Thanks for the reply. Please see my reply in [Zoom Custom UI ans screen sharing IOS swift](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/2) and I will provide further assistance over there.

Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:49pm UTC](https://devforum.zoom.us/t/customui-in-swift-project/5665/9 "2020-08-21T21:49:14Z")

</div>


