Reamaze iOS SDK
Switch branches/tags
Nothing to show
Clone or download
lunaru Merge pull request #1 from Bootstragram/master
Added 'Appearance Customization' section in README
Latest commit c7036c6 Aug 26, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example Initial commit Apr 25, 2014
ReamazeSDK.xcodeproj Fix build Apr 25, 2015
ReamazeSDK Only ignore certs for DEBUG May 10, 2014
.gitignore Initial commit Apr 25, 2014
LICENSE Initial commit Apr 25, 2014
README.md Added 'Appearance Customization' section in READM Aug 26, 2015
Reamaze.podspec update podspec with version May 11, 2014

README.md

Reamaze SDK for iOS

Reamaze allows you to embed a support knowledge base into your app.

Sample app

For a quick first look at Reamaze, we have included a very small sample application that you can build and run. The sample app demonstrates presenting a ReamazeController and delegation when the controller is finished.

Installation

There are two ways to add Reamaze to your project:

CocoaPods

CocoaPods is a common library dependency management tool for Objective-C. To use the Reamaze iOS bindings with CocoaPods, simply add the following to your Podfile and run pod install:

pod 'Reamaze', :git => 'https://github.com/reamaze/reamaze-ios.git'

Note: be sure to use the .xcworkspace to open your project in Xcode instead of the .xcproject.

Copy manually

  1. Clone this repository (git clone --recursive)
  2. In the menubar, click on 'File' then 'Add files to "Project"...'
  3. Select the 'ReamazeSDK' directory in your cloned reamaze-ios repository
  4. Make sure "Copy items into destination group's folder (if needed)" is checked"
  5. Click "Add"

Instructions

Integrate

Trigger Reamaze from anywhere (e.g. Button Press)

// SomeViewController.m

- (IBAction)viewHelp:(id)sender {
  ReamazeController *reamaze = [[ReamazeController alloc] init];
  reamaze.brand = @"YOUR BRAND HERE"; // Get your brand from the subdomain of your public site. (e.g. foobar.reamaze.com is brand "foobar")
  [self presentModalViewController:reamaze animated:YES];
}

Appearance Customization

If you decide to customize the appearance of the navigation bar within your app, a typical implementation can be:

[[UINavigationBar appearance] setTitleTextAttributes:@{
                                                           NSFontAttributeName: [UIFont fontWithName:myFontName size:mySize],
                                                           NSForegroundColorAttributeName:myColor
                                                           }];
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:@{
                                                                                                       NSFontAttributeName: [UIFont fontWithName:myFont size:mySize],
                                                                                                       NSForegroundColorAttributeName: myColor
                                                                                                       }
                                                                                        forState:UIControlStateNormal];
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:@{
                                                                                                       NSForegroundColorAttributeName: myColorWithHalfAlpha
                                                                                                       }
                                                                                        forState:UIControlStateDisabled];

Optional Delegation

Create a class that conforms to the ReamazeControllerDelegate protocol.

// SomeViewController.h

#import "Reamaze.h"
@interface SomeViewController : UIViewController<ReamazeControllerDelegate>
// ...

Write a delegate method to receive the callback when the user is done viewing your knowledge base

// SomeViewController.m

- (void)reamazeCompletionHandler:(ReamazeController *)reamaze {
  NSLog(@"Reamaze is done");
}

That's all you need to do!