सामग्री पर जाएं

CocoaPods के साथ InboxUI सेट अप करें

  1. अपनी प्रोजेक्ट डायरेक्टरी में टर्मिनल से ‘pod init’ कमांड चलाएँ।

  2. नई बनाई गई Podfile खोलें।

  3. अपने प्रोजेक्ट नाम के लक्ष्य के तहत Pushwoosh निर्भरता जोड़ें:

# Uncomment the next line to define a global platform for your project
# platform: ios, ‘9.0’
target ‘MyAppdo
# Comment the next line if you don’t want to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'PushwooshInboxUI'
end
  1. अपनी प्रोजेक्ट डायरेक्टरी में टर्मिनल में निम्नलिखित कमांड चलाएँ:
pod install
  1. नई बनाई गई <your_project_name>.xcworkspace फ़ाइल खोलें।

  2. बहुत बढ़िया! आपने अभी-अभी अपने प्रोजेक्ट में Pushwoosh InboxUI को एकीकृत किया है।

Pushwoosh InboxUI कोड जोड़ें

Anchor link to

अपने ऐप में Inbox UI दिखाने के लिए, Inbox व्यू कंट्रोलर जोड़ें:

self.navigationController?.pushViewController(PWIInboxUI.createInboxController(with: PWIInboxStyle.default()), animated: true)

Inbox को अपने ऐप के स्वरूप से मिलाने के लिए, PWIInboxStyle के पैरामीटर बदलें। आप फ़ॉन्ट, पृष्ठभूमि रंग, आदि जैसे पैरामीटर को अनुकूलित कर सकते हैं।

//creating a new Inbox style
let inboxStyle = PWIInboxStyle.customStyle(withDefaultImageIcon: UIImage.init(named: "custom_image"),
textColor: UIColor.darkText,
accentColor: UIColor.blue,
font: UIFont.systemFont(ofSize: 17))
inboxStyle?.backgroundColor = UIColor.init(white: 1, alpha: 1)
inboxStyle?.listErrorMessage = NSLocalizedString("Custom error message", comment: "Custom error message")
inboxStyle?.listEmptyMessage = NSLocalizedString("Custom empty message", comment: "Custom empty message")
PWIInboxStyle.setupDefaultStyle(inboxStyle)

अनुकूलन

Anchor link to

Inbox UI शैली को अनुकूलित करने के लिए, कृपया देखें:

अधिक जानकारी के लिए, Inbox Sample देखें।