Skip to content

Commit

Permalink
CMOB-0: update deployment target and podspec (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorledingham committed Oct 17, 2017
1 parent 323b26c commit 4c9b980
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions OwlBanners.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "OwlBanners"
s.version = "0.2.0"
s.ios.deployment_target = "8.0"
s.version = "0.4"
s.ios.deployment_target = "10.3"
s.summary = "OwlBanners is a simple Swift framework for displaying custom banners."
s.homepage = "https://github.com/hootsuite/OwlBanners"
s.license = { :type => "Apache", :file => "LICENSE.md" }
Expand Down
8 changes: 4 additions & 4 deletions OwlBanners.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -273,7 +273,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -296,7 +296,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = OwlBanners/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = hootsuite.com.OwlBanners;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -319,7 +319,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = OwlBanners/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = hootsuite.com.OwlBanners;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ OwlBanners has been developed for use in the Hootsuite iOS app.

## Requirements

- iOS 8.0+ (OwlBannersDemo demo project requires iOS 9.0+)
- Xcode 7.3+
- iOS 10.3+
- Xcode 8.3+

## Demo Projects

Expand All @@ -39,15 +39,15 @@ OwlBanners can be installed using either [Carthage](https://github.com/Carthage/

To integrate OwlBanners into your Xcode project using Carthage, specify it in your Cartfile:

```
```swift
github "hootsuite/OwlBanners"
```

### CocoaPods

First, add the following line to your Podfile:

```
```swift
pod 'OwlBanners'
```

Expand All @@ -61,11 +61,11 @@ pod install

OwlBanners requires access to the currently displayed `UIWindow` as well as some additional information about the app's UI. All these requirements are stated in a protocol named `ApplicationContext`.
A very convenient way to hook up all these requirements is to simply make your `UIApplication` conform to `ApplicationContext` since it already provides everything necessary for `ApplicationContext`.
```
```swift
extension UIApplication: ApplicationContext {}
```
Once that is done you can initialize OwlBanners in your `AppDelegate`:
```
```swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

// Your setup code here
Expand All @@ -83,13 +83,13 @@ A default banner style is provided which allows for displaying simple success, w

Banners are easily created by supplying a banner style and a title to the Banner intializer. For example, we can create the default success banner as follows:

```
```swift
let banner = Banner(DefaultBannerStyle.Success, title: "My first banner!")
```

Displaying a banner is as simple as calling the enqueue() method on a banner object.

```
```swift
banner.enqueue()
```

Expand All @@ -107,7 +107,7 @@ To create a custom banner you must provide a UIView that implements the BannerVi

The BannerView protocol is defined as:

```
```swift
public protocol BannerView {
var title: String { get set }
}
Expand All @@ -121,7 +121,7 @@ Note that if your banner does not display a textual title, you do not strictly n

The BannerStyle protocol is defined as:

```
```swift
public protocol BannerStyle {
var bannerConfiguration: BannerConfiguration { get }
}
Expand All @@ -133,7 +133,7 @@ To setup a banner style, you create a struct with as many cases as desired and t

The BannerConfiguration initializer takes two mandatory and three optional parameters. These include the view implementing BannerView, a bufferHeight (discussed in the next session), the preferred status bar style, the default display metrics to be used, and the default setting for requiring user dismissal.

```
```swift
BannerConfiguration(bannerView: DefaultBannerView.bannerView(.greenColor()), bufferHeight: 100.0)
```

Expand All @@ -148,14 +148,14 @@ The default display metrics define the timing of the banners with a given config

For example, if BannerDisplayMetrics(1.0, 2.0, 3.0) was supplied as display metrics to the configuration returned for a .Success case on a banner style called MyStyle, then all banners created with Banner(MyStyle.Success, title: "My title") would take 1 second to present, 2 to display on screen, and 3 to dismiss. If desired, this could then be overridden a per banner case using:

```
```swift
let slowBanner = Banner(MyStyle.Success, title: "Slow")
slowBanner.displayMetrics = BannerDisplayMetrics(5, 5, 5)
```

The default requires user dismissal parameter defines if the banners for a given case within a style require user dismissal. If not supplied, this defaults to false. Again, if set, this can be overriden on a per case basis using:

```
```swift
let banner = Banner(MyStyle.Success, title: "Dismiss me!")
banner.requiresUserDismissal = true
```
Expand All @@ -179,7 +179,7 @@ See DogBannerView.swift and AnimalBannerStyle.swift in the OwlBannersDemo projec

Displaying a custom banner works the same as displaying a default banner. Banner's of any banner style can be intermixed as appropriate and will display as part of the same queue.

```
```swift
Banner(CustomBannerStyle.Success, title: "My first custom success banner!").enqueue()
Banner(DefaultBannerStyle.Success, title: "Another default success banner!").enqueue()
Banner(CustomBannerStyle.Success, title: "Another custom success banner!").enqueue()
Expand All @@ -194,7 +194,7 @@ This is done by writing the banner customization code in Swift and then providin

This wrapper may look something like:

```
```swift
class DemoBanner: Banner {
static func successBanner(title: String) -> DemoBanner {
return DemoBanner(DemoBannerStyle.Success, title: title)
Expand Down

0 comments on commit 4c9b980

Please sign in to comment.