Skip to content

Hacknocraft/AppFriendsFloatingWidget_iOS

Repository files navigation

AppFriends

MAKE YOUR APP SOCIAL
Engage users with our turnkey social layer

Build Status Cocoapods compatible

AppFriends Floating Widget

This floating widget works with AppFriends to provide:

  1. message badge and preview bubble popup over any UI
  2. screenshot taking and sharing to chat

Integration

To integrate AppFriends iOS SDK to your Xcode iOS project, add this line in your Podfile

pod 'AppFriendsFloatingWidget', '~> 1.0.4'

Also, add use_frameworks! to the top of file. eg.

source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/Hacknocraft/hacknocraft-cocoapods-spec.git'

Present the widget

/// Present the AppFriends Widget. The AppFriends widget has these features:
/// 1. show message preview button
/// 2. show badge
/// 3. draggable
/// 4. you can use it share screenshots to chat
func presentWidget() {

    let floatingWidget =
        HCFloatingWidget(widgetImage: UIImage(named: "ic_chat_widget"),
                         screenshotButtonImage: UIImage(named: "ic_camera"),
                         showScreenshotButton: true)
    floatingWidget.present(overVC: self, position: CGPoint(x: 295, y: 60))
    floatingWidget.delegate = self
}