Additional Customizations
Further Customizations in iOS Notification Center
Customization(s) can be performed from the nvResourceValues.plist file which is included within your iOS SDK zip file. You can import the nvResourceValues.plist file in your project's main target by simply dragging and dropping it to your project navigator present under the main app target folder.
Values are divided into main category and key value pairs main categories are as follows:
-
nvBooleans : All Keys which required a boolean type value (i.e. YES / NO) are defined under this category for example to hide or show a heading text at top of Notification Center set the value of nvShowHeaderView
-
nvStrings: All Keys which required a string type value (i.e. font name / background Image name / Texts etc.) are defined under this category for example to set font of the text of notification message into Notification Center set the font name in the key nvNotificationContentMsgFont (if the font name given is not a valid or supported font name then default font name will be applied which is set as Helvetica)
-
nvColors: All Keys which required a color code to set colors are defined under this category pass HEX or RGBA color code in string format (for Hex color : #ff0000 and for RGBA : rgba(227,188,99,1.0)) for example to set text color of notification message into Notification Center set the color code in the key nvNotificationContentMsgColor (if the color code given is not in valid format at defined above then default a color will be applied)
-
nvNumbers: All Keys which required a numeric type value (i.e. font size / Border width etc.) are defined under this category for example to set font size of the text of notification message into Notification Center set the font size in the key nvNotificationContentMsgFontSize.
For StatusBar:
- To change Status Bar color goto nvColors and give color code value of nvstatusBarColor as Shown in example below.
For HEX Color Code:
For RGBA Color Code:
For NavigationBar:
1. NavigationBar Background:
You can change NavigationBar Background color or you can pass background Image url to set it as NavigationBar background to customise NavigationBar background goto nvStrings and change the value of key nvNavigationBarBackground as Shown in example below.
To Change Color:
To set Image as NavigationBar background:
2. NavigationBar Title:
a. Title Text:
You can change NavigationBar title text to set it goto nvStrings and change the value of key nvNavigationBarTitle by default its value is Notifications.
b. Title Font Name:
You can change NavigationBar title text font name to change it goto nvStrings and change the value of key nvNavigationBarTitleFont (if the font name given is not a valid or supported font name then default font name will be applied which is set as Helvetica-Bold).
c. Title Font Size:
You can change NavigationBar title text font size to change it goto nvNumbers and change the value of key nvNavigationBarTitleFontSize. by default its value is 18.
d. Title Color:
You can change NavigationBar title text color to set it goto nvColors and change the value of key nvNavigationBarTitleColor (give color values in the valid format as described previously) by default its value is Black.
3. Close Button:
a. Close Button Icon Color:
You can change the close button icon color to set it goto nvColors and change the value of key nvNavigationBarButtonColor (give color values in the valid format as described previously) by default its value is Black.
b. Close Button Icon Size:
You can change the close button icon size to change it goto nvNumbers and change the value of key nvNavigationBarButtonSize. by default its value is 14.
In General Customisation:
1. Notification Center Background:
Notification Center ViewController’s Main view background can be customised. You can apply background color / background Image using url or any image imported into your iOS project to change it goto nvStrings and change the value of key nv_notificationCentreBackground by default value set as an image name (i.e. nv_NotificationCenterBg.png) and the image was imported in your project with the sdk files.
2. Header View:
a. Header View Visibility (show / hide):
You can show or hide a title text in a header view to set its visibility goto nvBooleans and set the value of key nvShowHeaderView (set its value as YES / NO if nvShowHeaderView value is YES then header title view will be visible if its value is NO then header title view will be hidden).
b. Header View Background:
You can set header view background color / background Image using url or any image imported into your iOS project to change it goto nvStrings and change the value of key nvHeaderBackground by default background color given to it and its Hex color value is #007fb7.
c. Header View Title Text :
You can change header view title text to set it goto nvStrings and change the value of key nvHeaderTitleText by default its value is “Your latest updates and offers”.
d. Header View Title Text Font Name:
You can change header view title text font name to change it goto nvStrings and change the value of key nvHeaderTitleFont (if the font name given is not a valid or supported font name then default font name will be applied which is set as Helvetica).
e. Header View Title Text Font Size:
You can change header view title text font size to change it goto nvNumbers and change the value of key nvHeaderTitleFontSize. by default its value is 16.
f. Header View Title Text Color:
You can change header view title text color to set it goto nvColors and change the value of key nvHeaderTitleColor (give color values in the valid format as described previously) by default its value is White.
3. Notification Content View (Card View)
a. Notification Content View Background Color:
You can change notification content view (i.e. card view) background color to set it goto nvColors and change the value of key nvNotificationContentBgColor (give color values in the valid format as described previously) by default its Hex color value is #ffffff.
b. Notification Content View Border Color:
You can change notification content view (i.e. card view) border color to set it goto nvColors and change the value of key nvNotificationContentBorderColor (give color values in the valid format as described previously) by default its Hex color value is #a1a5ab.
c. Notification Content View Border Corner Radius:
You can change notification content view (i.e. card view) border corner radius to change it goto nvNumbers and change the value of key nvNotificationContentBorderCornerRadius. by default its value is 5.0.
d. Notification Content View Border Width:
You can change notification content view (i.e. card view) border width to change it goto nvNumbers and change the value of key nvNotificationContentBorderWidth. by default its value is 5.0.
4. Notification Title:
a. Notification Title Font Name:
You can change notification title text font name to change it goto nvStrings and change the value of key nvNotificationContentTitleFont (if the font name given is not a valid or supported font name then default font name will be applied which is set as Helvetica-Bold).
b. Notification Title Font Size:
You can change notification title text font size to change it goto nvNumbers and change the value of key nvNotificationContentTitleFontSize. by default its value is 14.
c. Notification Title Color:
You can change notification title text color to set it goto nvColors and change the value of key nvNotificationContentTitleColor (give color values in the valid format as described previously) by default its Hex color value is #696E79.
5. Notification Message:
a. Notification Message Font Name:
You can change notification message text font name to change it goto nvStrings and change the value of key nvNotificationContentMsgFont (if the font name given is not a valid or supported font name then default font name will be applied which is set as Helvetica).
b. Notification Message Font Size:
You can change notification message text font size to change it goto nvNumbers and change the value of key nvNotificationContentMsgFontSize. by default its value is 12.
c. Notification Message Color:
You can change notification message text color to set it goto nvColors and change the value of key nvNotificationContentMsgColor (give color values in the valid format as described previously) by default its Hex color value is #848484.
6. Notification Time:
a. Notification Time Font Name:
You can change notification sent time text font name to change it goto nvStrings and change the value of key nvNotificationContentTimeFont (if the font name given is not a valid or supported font name then default font name will be applied which is set as Helvetica).
b. Notification Time Font Size:
You can change notification sent time text font size to change it goto nvNumbers and change the value of key nvNotificationContentTimeFontSize. by default its value is 10.
c. Notification Time Color:
You can change notification sent time text color to set it goto nvColors and change the value of key nvNotificationContentTimeColor (give color values in the valid format as described previously) by default its Hex color value is #94989F.
7. Call To Action Button (CTA Button)
a. Transparent Background of CTA Buttons:
If you want to make cta buttons into notification must have transparent background then you can goto nvBooleans and set the value of key TransparentCtaButtonBackground (set its value as YES / NO if TransparentCtaButtonBackground value is YES then background of all cta buttons in notifications will be transparent). By default its value is NO.
b. Call To Action (CTA) Button Background Color:
If you have not set transparent background for cta button then you can set a background color for the cta buttons to set it goto nvColors and change the value of key nvCtaButtonBackgroundColor (give color values in the valid format as described previously) by default its Hex color value is #ffffff.
c. Call To Action (CTA) Button Border Color:
You can change the border color of the call to action button (i.e. cta button) to set it goto nvColors and change the value of key nvCtaButtonBorderColor (give color values in the valid format as described previously) by default its Hex color value is #696E79.
d. Call To Action (CTA) Button Border Width:
You can change the border width of the call to action button (i.e. cta button) to set it goto nvNumbers and change the value of key nvCallToActionButtonBorderSize by default its value is 1.0.
e. Call To Action (CTA) Button Text Font Name:
You can change call to action button (i.e. cta button) text font name to change it goto nvStrings and change the value of key nvCallToActionButtonFont (if the font name given is not a valid or supported font name then default font name will be applied which is set as Helvetica-Bold).
f. Call To Action (CTA) Button Text Font Size:
You can change the call to action button (i.e. cta button) text font size to change it goto nvNumbers and change the value of key nvCallToActionButtonFontSize. by default its value is 14.
g. First Call To Action (CTA) Button Text Color:
There can be maximum 2 cta buttons in the notifications and you can change first call to action button (i.e. cta button) text color to set it goto nvColors and change the value of key nvCtaBtton1TextColor (give color values in the valid format as described previously) by default its Hex color value is #696E79.
h. Second Call To Action (CTA) Button Text Color:
There can be maximum 2 cta buttons in the notifications and you can change second call to action button (i.e. cta button) text color to set it goto nvColors and change the value of key nvCtaBtton2TextColor (give color values in the valid format as described previously) by default its Hex color value is #696E79.
Updated 9 months ago