API Documentation


In XNotify on each view controller we have provided you with default background images, default text fonts, text size and text colours etc and we have given the facility to change the background according to your app's look and feel.


We will provide you a sample code in which some method are declared, you just need to call and replace the attributes that you want to change. If you don't then just call the method, defaults value will be shown on your user interface.


Method that you must call and define


-(void) changeHeaderView:(XNotifyMessagesViewController*) msgVC;

-(void) changeMainUserInterface:

(XNotifyMessagesViewController*)msgVCObj;

-(void) changeTextUserInterface:

(XNotifyMessagesViewController*)msgVCObj;

-(void) changeEventUserInterface:

(XNotifyMessagesViewController*)msgVCObj;

-(void) changePhotosVideosUserInterface:

(XNotifyMessagesViewController*)msgVCObj;

-(void) changeNewsletterUserInterface:

(XNotifyMessagesViewController*)msgVCObj;

-(void) changeDocumentsUserInterface:

(XNotifyMessagesViewController*)msgVCObj;

-(void) changeSurveyUserInterface:

(XNotifyMessagesViewController*)msgVCObj;

Change Header theme

 

Call this method

 

-(void) changeHeaderView:(XNotifyMessagesViewController*) msgVC;

and pass XNotifyMessagesViewController's object as a parameter.

 

Eg. If you want to change Header theme i.e navigation bar view, then call the above method where you have created XNotifyMessagesViewController's object.


[self changeHeaderView:xnotifyMsgVCObj]; // call where you are doing integration of XNotify Framework


Now give this method definition (copy n paste) this function in same class


-(void) changeHeaderView:(XNotifyMessagesViewController*)

msgVC

{

// Change Back Button Image

msgVC.kBackBtnImage = @"backBtn.png"; // replace your back button image name.

// Change Header Image

msgVC.kHeaderPNG = @"header.png"; // give your header image name here.

// Change Header Title

// Title Color

msgVC.kHeaderTitleHexColorCode = @"#8C2828"; // give the desired html colour code here.

// Title Font

msgVC.kHeaderTitleFontName = @"Helvetica";

// give the desired font name.

// Title Size

msgVC.kHeaderTitleSize = @"15.0"; // give desired text size.

// Change SlideShow Botton Image

msgVC. kSlideShowBtnImg = @"slideShowBtn.png";

// give the slide show button image name.

}

just replace the values above and see the reflected changes.

Change view controller's theme


As we discussed above that we have provided some methods that you need to call and define in your class, these methods

- Can change background image

- Can change background colour


- Can change text colour of any label

- Can change Font of any label

- Can change text size of any label


Now we are taking an example code, you can call and define rest of the methods to change other view controller's look and feel. We are taking the main view controller XNotifyMessagesViewController.


Call this method:

-(void) changeMainUserInterface:

(XNotifyMessagesViewController*)msgVCObj;

and pass XNotifyMessagesViewController's object as a parameter.

Eg. For main View Controller.

[self changeMainUserInterface:xnotifyMsgVCObj]; // method calling


Now give this method definition (copy n paste) this function in same class

-(void) changeMainUserInterface:

(XNotifyMessagesViewController*)msgVCObj

{

// Change Fonts and Text color of Main View

// Change TableView Background Image

msgVCObj.kTableViewBGImage = @"tableViewBG.png";

// change background image

// Change TableView Background Color

msgVCObj.kMainViewBGHexColorCode = @"#FFFFFF";

// change background colour

// Notification Message

// TextColor

msgVCObj.kNotfMsgHexColorCode = @"#8C2828";

// change message text colour

// TextFont

msgVCObj.kNotfMsgFontName = @"Helvetica;

// change message text font

// TextSize

msgVCObj.kNotfMsgTextSize = @"11.0";

// change message text size

// Notification Type

// TextColor

msgVCObj.kNotfTypeHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kNotfTypeFontName = @"Helvetica";

// TextSize

msgVCObj.kNotfTypeTextSize = @"11.0";

// Notification Date

// TextColor

msgVCObj.kNotfDateHexColorCode = @"#8C2828";

// change date text color

// TextFont

msgVCObj.kNotfDateFontName = @"Helvetica";

// chage date text font

// TextSize

msgVCObj.kNotfDateTextSize = @"11.0";

// change date text size

// Notification GroupName

// TextColor

msgVCObj.kNotfGroupHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kNotfGroupFontName = @"Helvetica;

// TextSize

msgVCObj.kNotfGroupTextSize = @"11.0";

}


Now as we are talking about the main view controller i.e XNotifyMessageViewController, you can change background image, colour, font, text colour etc just by replacing their string values . Read the commented lines to understand which attribute you want to change.


Give the definition of rest of the methods


 

- For Text View Controller

call this method:

 

[self changeTextUserInterface:xnotifyMsgVCObj];

Now give this method definition (copy n paste) this function in same class and do the appropriate changes

 

-(void) changeTextUserInterface:

(XNotifyMessagesViewController*)msgVCObj

{

// Change Fonts and Text color of Text View

// Change TextView Background Image

msgVCObj.TextViewControllerBG = @"background.png";

// Change TextView Background Color

msgVCObj.TextViewBGHexColorCode = @"#8C2828";

// Message Title

// TextColor

msgVCObj.TextMsgTitleHexColorCode = @"#FFFFFF";

// TextFont

msgVCObj.TextMsgTitleFontName = @"Helvetica";

// TextSize

msgVCObj.TextMsgTitleTextSize = @"11.0";

// Text Label

// TextColor

msgVCObj.TextTextLblHexColorCode = @"#FFFFFF";

// TextFont

msgVCObj.TextTextLblFontName = @"Helvetica";

// TextSize

msgVCObj.TextTextLblTextSize = @"11.0";

// Date

// TextColor

msgVCObj.TextDateHexColorCode = @"#FFFFFF";

// TextFont

msgVCObj.TextDateFontName = @"Helvetica";

// TextSize

msgVCObj.TextDateTextSize = @"11.0";

// Group Name

// TextColor

msgVCObj.TextGroupHexColorCode = @"#8C2828";

// TextFont

msgVCObj.TextGroupFontName = @"Helvetica";

// TextSize

msgVCObj.TextGroupTextSize = @"11.0";

// Message Label

// TextColor

msgVCObj.TextMsgLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.TextMsgLblFontName = @"Helvetica";

// TextSize

msgVCObj.TextMsgLblTextSize = @"11.0";

// Message

// TextColor

msgVCObj.TextMsgHexColorCode = @"#8C2828";

// TextFont

msgVCObj.TextMsgFontName = @"helvetica";

// TextSize

msgVCObj.TextMsgTextSize = @"11.0";

// Description Label

// TextColor

msgVCObj.TextDescrpLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.TextDescrpLblFontName = @"Helvetica";

// TextSize

msgVCObj.TextDescrpLblTextSize = @"11.0";

// Description

// TextColor

msgVCObj.TextDescrpHexColorCode = @"#8C2828";

// TextFont

msgVCObj.TextDescrpFontName = @"helvetica";

// TextSize

msgVCObj.TextDescrpTextSize = @"11.0";

}


 

- For Event View Controller

call this method:

 

[self changeEventUserInterface:xnotifyMsgVCObj];

Now give this method definition (copy n paste) this function in same class and do the appropriate changes

 

-(void) changeEventUserInterface:

(XNotifyMessagesViewController*)msgVCObj

{

// Change Fonts and Text color of Event View

// Change EventView Background Image

msgVCObj.kEventViewControllerBG = @"background.png";

// Change EventView Background Color

msgVCObj.kEventViewBGHexColorCode = @"#FFFFFF";

//Main Message Title

// TextColor

msgVCObj.kEventMainMsgTitleHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventMainMsgTitleFontName = @"Helvetica";

// TextSize

msgVCObj.kEventMainMsgTitleTextSize = @"11.0";

// From Label

// TextColor

msgVCObj.kEventFromLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventFromLblFontName = @"Helvetica";

// TextSize

msgVCObj.kEventFromLblTextSize = @"11.0";

// Start Date

// TextColor

msgVCObj.kEventStrtDateHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventStrtDateFontName = @"Helvetica";

// TextSize

msgVCObj.kEventStrtDateTextSize = @"11.0";

To Label

// TextColor

msgVCObj.kEventToLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventToLblFontName = @"Helvetica";

// TextSize

msgVCObj.kEventToLblTextSize = @"11.0";

// End Date

// TextColor

msgVCObj.kEventEndDateHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventEndDateFontName = @"Helvetica";

// TextSize

msgVCObj.kEventEndDateTextSize = @"11.0";

// Event Label

// TextColor

msgVCObj.kEventEventLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventEventLblFontName = @"Helvetica";

// TextSize

msgVCObj.kEventEventLblTextSize = @"11.0";

// Group Name

// TextColor

msgVCObj.kEventGroupHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventGroupFontName = @"helvetica";

// TextSize

msgVCObj.kEventGroupTextSize = @"11.0";

// Location Label

// TextColor

msgVCObj.kEventLocLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventLocLblFontName = @"Helvetica";

// TextSize

msgVCObj.kEventLocLblTextSize = @"11.0";

// Location

// TextColor

msgVCObj.kEventLocHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventLocFontName = @"helvetica";

// TextSize

msgVCObj.kEventLocTextSize = @"11.0";

// Message Label

// TextColor

msgVCObj.kEventMsgLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventMsgLblFontName = @"Helvetica";

// TextSize

msgVCObj.kEventMsgLblTextSize = @"11.0";

// Message

// TextColor

msgVCObj.kEventMsgHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kEventMsgFontName = @"Helvetica";

// TextSize

msgVCObj.kEventMsgTextSize = @"11.0";

// Description Label

// TextColor

msgVCObj.kEventDescrpLblHexColorCode =@"#8C2828";

// TextFont

msgVCObj.kEventDescrpLblFontName =@"Helvetica";

// TextSize

msgVCObj.kEventDescrpLblTextSize = @"11.0";

// Description

// TextColor

msgVCObj.kEventDescrpHexColorCode =@"#8C2828";

// TextFont

msgVCObj.kEventDescrpFontName = @"Helvetica";

// TextSize

msgVCObj.kEventDescrpTextSize = @"11.0";

}


 

- For PhotosAndVideos View Controller

 

call this method:

[self changePhotosVideosUserInterface:xnotifyMsgVCObj];

 

Now give this method definition (copy n paste) this function in same class and do the appropriate changes

-(void) changePhotosVideosUserInterface:

(XNotifyMessagesViewController*)msgVCObj

{

// Change Fonts and Text color of Photos and Videos View

// Change ImageGalleryView Background Image

msgVCObj.kPhotosNVideosViewControllerBG = @"background.png";

// Change ImageGalleryView Background Color

msgVCObj.kPhotosNVideosViewBGHexColorCode = @"#FFFFFF";

// Main Message Title

// TextColor

msgVCObj.kPnVMainMsgTitleHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kPnVMainMsgTitleFontName = @"Helvetica";

// TextSize

msgVCObj.kPnVMainMsgTitleTextSize = @"11.0";

// Photos n Videos Label

// TextColor

msgVCObj.kPnVPnVLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kPnVPnVLblFontName = @"Helvetica";

// TextSize

msgVCObj.kPnVPnVLblTextSize = @"11.0";

// Date

// TextColor

msgVCObj.kPnVDateHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kPnVDateFontName = @"Helvetica";

// TextSize

msgVCObj.kPnVDateTextSize = @"11.0";

// Group Name

// TextColor

msgVCObj.kPnVGroupHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kPnVGroupFontName = @"Helvetica";

// TextSize

msgVCObj.kPnVGroupTextSize = @"11.0";

// Message Label

// TextColor

msgVCObj.kPnVMsgLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kPnVMsgLblFontName = @"Helvetica";

// TextSize

msgVCObj.kPnVMsgLblTextSize = @"11.0";

// Message

// TextColor

msgVCObj.kPnVMsgHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kPnVMsgFontName = @"Helvetica";

// TextSize

msgVCObj.kPnVMsgTextSize = @"11.0";

// Description Label

// TextColor

msgVCObj.kPnVDescrpLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kPnVDescrpLblFontName = @"Helvetica";

// TextSize

msgVCObj.kPnVDescrpLblTextSize = @"11.0";

// Description

// TextColor

msgVCObj.kPnVDescrpHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kPnVDescrpFontName = @"Helvetica";

// TextSize

msgVCObj.kPnVDescrpTextSize = @"11.0";

}

 

-For Newsletter View Controller

 

call this method:

 

[self changeNewsletterUserInterface:xnotifyMsgVCObj];

Now give this method definition (copy n paste) this function in same class and do the appropriate changes

-(void) changeNewsletterUserInterface:

(XNotifyMessagesViewController*)msgVCObj

// Change Fonts and Text color of Newsletter View

// Change NewsletterView Background Image

msgVCObj.kNewsletterViewControllerBG = @"background.png";

// Change Newsletter Background Color

msgVCObj.kNewsletterViewBGHexColorCode = @"#FFFFFF";

// Newsletter Label

// TextColor

msgVCObj.kNewsletterNLLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kNewsletterNLLblFontName = @"Helvetica";

// TextSize

msgVCObj.kNewsletterNLLblTextSize = @"11.0";

// Date

// TextColor

msgVCObj.kNewsletterDateHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kNewsletterDateFontName = @"Helvetica";

// TextSize

msgVCObj.kNewsletterDateTextSize = @"11.0";

// Group Name

// TextColor

msgVCObj.kNewsletterGroupHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kNewsletterGroupFontName = @"Helvetica";

// TextSize

msgVCObj.kNewsletterGroupTextSize = @"11.0";

// Message Label

// TextColor

msgVCObj.kNewsletterMsgLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kNewsletterMsgLblFontName = @"Helvetica";

// TextSize

msgVCObj.kNewsletterMsgLblTextSize = @"11.0";

// Message

// TextColor

msgVCObj.kNewsletterMsgHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kNewsletterMsgFontName = @"Helvetica";

// TextSize

msgVCObj.kNewsletterMsgTextSize = @"11.0";

}

 

- For Document View Controller

 

[self changeDocumentsUserInterface:xnotifyMsgVCObj];

 

Now give this method definition (copy n paste) this function in same class and do the appropriate changes

 

-(void) changeDocumentsUserInterface:

(XNotifyMessagesViewController*)msgVCObj

{

// Change Fonts and Text color of Document View

// Change DocumentView Background Image

msgVCObj.kDocumentViewControllerBG = @"background.png";

// Change Document Background Color

msgVCObj.kDocumentViewBGHexColorCode = @"#FFFFFF";

// Main Message Title

// TextColor

msgVCObj.kDocumentMainMsgTitleHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kDocumentMainMsgTitleFontName = @"Helvetica";

// TextSize

msgVCObj.kDocumentMainMsgTitleTextSize = @"11.0";

// Document Label

// TextColor

msgVCObj.kDocumentDocLblHexColorCode =@"#8C2828";

// TextFont

msgVCObj.kDocumentDocLblFontName =@"Helvetica";

// TextSize

msgVCObj.kDocumentDocLblTextSize = @"11.0";

// Date

// TextColor

msgVCObj.kDocumentDateHexColorCode =@"#8C2828";

// TextFont

msgVCObj.kDocumentDateFontName = @"Helvetica";

// TextSize

msgVCObj.kDocumentDateTextSize = @"11.0";

// Group Name

// TextColor

msgVCObj.kDocumentGroupHexColorCode =@"#8C2828";

// TextFont

msgVCObj.kDocumentGroupFontName =@"Helvetica";

// TextSize

msgVCObj.kDocumentGroupTextSize = @"11.0";

// Message Label

// TextColor

msgVCObj.kDocumentMsgLblHexColorCode =@"#8C2828";

// TextFont

msgVCObj.kDocumentMsgLblFontName =@"Helvetica";

// TextSize

msgVCObj.kDocumentMsgLblTextSize = @"11.0";

// Message

// TextColor

msgVCObj.kDocumentMsgHexColorCode =@"#8C2828";

// TextFont

msgVCObj.kDocumentMsgFontName = @"Helvetica";

// TextSize

msgVCObj.kDocumentMsgTextSize = @"11.0";

// Description Label

// TextColor

msgVCObj.kDocumentDescrpLblHexColorCode =@"#8C2828";

// TextFont

msgVCObj.kDocumentDescrpLblFontName =@"Helvetica";

// TextSize

msgVCObj.kDocumentDescrpLblTextSize = @"11.0";

// Description

// TextColor

msgVCObj.kDocumentDescrpHexColorCode =@"#8C2828";

// TextFont

msgVCObj.kDocumentDescrpFontName =@"Helvetica";

// TextSize

msgVCObj.kDocumentDescrpTextSize = @"11.0";

}

 

- For Survey View Controller

 

call this method:

 

[self changeSurveyUserInterface:xnotifyMsgVCObj];

 

Now give this method definition (copy n paste) this function in same class and do the appropriate changes

-(void) changeSurveyUserInterface:

(XNotifyMessagesViewController*)msgVCObj

{

// Change Fonts and Text color of Survey View

// Change SurveyView Background Image

msgVCObj.kSurveyViewControllerBG = @"background.png";

// Change Survey Background Color

msgVCObj.kSurveyViewBGHexColorCode = @"#FFFFFF";

// Topic

// TextColor

msgVCObj.kSurveyTopicHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kSurveyTopicFontName = @"Helvetica";

// TextSize

msgVCObj. kSurveyTopicTextSize = @"11.0";

// Survey Label

// TextColor

msgVCObj.kSurveySurLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kSurveySurLblFontName = @"Helvetica";

// TextSize

msgVCObj.kSurveySurLblTextSize = @"11.0";

// Date

// TextColor

msgVCObj.kSurveyDateHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kSurveyDateFontName = @"Helvetica";

// TextSize

msgVCObj.kSurveyDateTextSize = @"11.0";

// Group Name

// TextColor

msgVCObj.kSurveyGroupHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kSurveyGroupFontName = @"Helvetica";

// TextSize

msgVCObj.kSurveyGroupTextSize = @"11.0";

// Message Label

// TextColor

msgVCObj.kSurveyMsgLblHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kSurveyMsgLblFontName = @"Helvetica";

// TextSize

msgVCObj.kSurveyMsgLblTextSize = @"11.0";

// Message

// TextColor

msgVCObj.kSurveyMsgHexColorCode = @"#8C2828";

// TextFont

msgVCObj.kSurveyMsgFontName = @"Helvetica;

// TextSize

msgVCObj.kSurveyMsgTextSize = @"11.0";

}

msgVCObj.kDocumentDescrpFontName = @"Helvetica";

// TextSize

msgVCObj.kDocumentDescrpTextSize = @"11.0";

}



Back to Top

Copyright © 2024 Comnez Inc. All rights reserved.