CometChatSDK
, CometChatUIKitSwift
) integrated.CometChat.login()
.UINavigationController
or modal presentation flow set up.Component | Responsibility |
---|---|
TransferOwnership | Subclass of CometChatGroupMembers enabling single selection mode. |
viewModel.groupMembers | Data source array of GroupMember objects. |
onSelectedItemProceed | Closure invoked when user confirms selection. |
CometChat.transferGroupOwnership | API call to delegate group ownership. |
spinnerView | UIActivityIndicatorView showing loading state. |
leaveGroupCallback | Callback to perform group exit after transfer. |
GroupDetailsViewController.swift
TransferOwnership.swift
TransferOwnership.swift
TransferOwnership.swift
TransferOwnership.swift
spinnerView.style
and color using CometChatTheme
.onError
closure.UIAlertController
with retry option.removeSpinnerView()
always executes in defer
.Feature | Method / Component | File(s) |
---|---|---|
Launch transfer flow | showTransferOwnership(for:) | GroupDetailsViewController.swift |
Single-member selection | selectionMode = .single | TransferOwnership.swift |
Filter out current owner | reloadData() override | TransferOwnership.swift |
Execute API transfer | CometChat.transferGroupOwnership() | TransferOwnership.swift |
Show/hide loading indicator | addSpinnerView() , removeSpinnerView() | TransferOwnership.swift |