Stories
CleverPush Story Widget
You can also implement CleverPush Stories into your application. For this, please set up a Story Widget in your CleverPush account. You can access stories via generated Widget Id and by following usage guide
Here is how the Stories will looks like:
Objective-C:
- Import "CleverPush/CPStoryView.h":
- Add the Story View:
#import <CleverPush/CPStoryView.h>
CPStoryView *storyView = [[CPStoryView alloc]
initWithFrame:CGRectMake(0.0, 83.0, self.view.frame.size.width, 125.0)
backgroundColor:[UIColor greenColor]
textColor:[UIColor blackColor]
fontFamily:@"AppleSDGothicNeo-Bold"
borderColor:[UIColor redColor]
storyWidgetId:@"STORY_WIDGET_ID"];
[self.view addSubview:storyView];
Swift:
- Import CleverPush
- Add the Story View:
import CleverPush
let storyView = CPStoryView(frame: CGRect(x: 0.0, y: 83.0, width: self.view.frame.size.width, height: 125.0 ),
backgroundColor: UIColor.green,
textColor: UIColor.black,
fontFamily: "AppleSDGothicNeo-Bold",
borderColor: UIColor.red,
storyWidgetId: "STORY_WIDGET_ID")!
self.view.addSubview(storyView)