Skip to content

Commit

Permalink
Merge pull request #90 from ThriveCommunityChurch/dev
Browse files Browse the repository at this point in the history
merge 1.6.4 into master
  • Loading branch information
ksigWyatt authored Oct 18, 2018
2 parents 0f61d0d + 898f639 commit d1f544f
Show file tree
Hide file tree
Showing 90 changed files with 3,988 additions and 8,827 deletions.
9 changes: 4 additions & 5 deletions LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -26,12 +25,12 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="710"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ThriveCirclesWhite" translatesAutoresizingMaskIntoConstraints="NO" id="5iv-WB-rYh">
<rect key="frame" x="82" y="124" width="210" height="210"/>
<rect key="frame" x="82" y="124" width="211" height="210"/>
<constraints>
<constraint firstAttribute="height" constant="210" id="LiS-Eg-2lv"/>
</constraints>
</imageView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="© 2018 Thrive Community Church All Rights Reserved" textAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="35s-QM-jPx">
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="© 2019 Thrive Community Church All Rights Reserved" textAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="35s-QM-jPx">
<rect key="frame" x="0.0" y="617" width="375" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="xyo-0I-vq9"/>
Expand Down
9,055 changes: 2,885 additions & 6,170 deletions Main.storyboard

Large diffs are not rendered by default.

320 changes: 48 additions & 272 deletions Thrive Church Official App.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

28 changes: 18 additions & 10 deletions Thrive Community Church/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import UIKit
import Firebase
import AVFoundation
import CoreVideo
import MediaPlayer
Expand All @@ -32,6 +33,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate, AVAudioPlayerDelegate {
// report for an error
print("Catches any errors with the AVPlayer")
}

// configure firebase for analytics events
FirebaseApp.configure()

Analytics.logEvent(AnalyticsEventAppOpen, parameters: [
AnalyticsParameterItemID: "id-AppOpen",
AnalyticsParameterItemName: "AppOpen",
AnalyticsParameterContentType: "cont"
])

return true
}

Expand Down Expand Up @@ -62,6 +73,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, AVAudioPlayerDelegate {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
print("application Did Enter Background")

Analytics.logEvent(AnalyticsEventSelectContent, parameters: [
AnalyticsParameterItemID: "id-AppInBackground",
AnalyticsParameterItemName: "AppInBackground",
AnalyticsParameterContentType: "cont"
])
}

func applicationWillEnterForeground(_ application: UIApplication) {
Expand All @@ -79,14 +96,5 @@ class AppDelegate: UIResponder, UIApplicationDelegate, AVAudioPlayerDelegate {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground
print("Will terminate")
}

// Use this method to perhaps advance the recording with a FF button?
override func remoteControlReceived(with event: UIEvent?) {

let rc = event!.subtype // = 2
let rc1 = event!.type // 101 is Pause... 100 is Play
print("does this work? \(rc.rawValue)")
print("does this work? \(rc1.rawValue)")
}


}
96 changes: 96 additions & 0 deletions Thrive Community Church/Extensions/Onboarding/OnboardingCell.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
//
// OnboardingCell.swift
// Thrive Church Official App
//
// Created by Wyatt Baggett on 7/15/18.
// Copyright © 2018 Thrive Community Church. All rights reserved.
//

import UIKit

class OnboardingCell: UICollectionViewCell {

let lightGray = UIColor(red: 220/255, green: 220/255, blue: 220/255, alpha: 1)

var page: Page? {
didSet {
// use a guard to avoid a crash from forced unwrapping the name if it's nil
guard let unwrappedPage = page else { return }
bearImageView.image = UIImage(named: unwrappedPage.imageName)

let attributedText = NSMutableAttributedString(string: unwrappedPage.headerText,
attributes: [NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: 18),
NSAttributedStringKey.foregroundColor: UIColor.white])

attributedText.append(NSAttributedString(string: "\n\n\n\(unwrappedPage.bodyText)",
attributes: [NSAttributedStringKey.font: UIFont.systemFont(ofSize: 12),
NSAttributedStringKey.foregroundColor: lightGray]))

textDescriptor.attributedText = attributedText
textDescriptor.textAlignment = .center
}
}

private let bearImageView: UIImageView = {
let imageView = UIImageView()
imageView.translatesAutoresizingMaskIntoConstraints = false
imageView.contentMode = .scaleAspectFit
return imageView
}()

private let textDescriptor: UITextView = {
let textView = UITextView()
textView.textAlignment = .center
textView.isEditable = false
textView.isScrollEnabled = false
textView.translatesAutoresizingMaskIntoConstraints = false
return textView
}()

// MARK: INIT

override init(frame: CGRect) {
super.init(frame: frame)

setupLayout()
}

// This is required and will throw any fatal errors
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}


func setupLayout() {
let topImageContainerView = UIView()
addSubview(topImageContainerView)

topImageContainerView.translatesAutoresizingMaskIntoConstraints = false

NSLayoutConstraint.activate([
// change this for more image room
topImageContainerView.heightAnchor.constraint(equalTo: heightAnchor, multiplier: 0.58),
topImageContainerView.topAnchor.constraint(equalTo: topAnchor, constant: 40),
// Leading anchors instead - Because the left / right is strange in some rare cases
topImageContainerView.leadingAnchor.constraint(equalTo: leadingAnchor),
topImageContainerView.trailingAnchor.constraint(equalTo: trailingAnchor)
])

// add before constraints to avoid a NSGenericException
topImageContainerView.addSubview(bearImageView)
addSubview(textDescriptor)

textDescriptor.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0)

NSLayoutConstraint.activate([
bearImageView.centerXAnchor.constraint(equalTo: topImageContainerView.centerXAnchor),
bearImageView.centerYAnchor.constraint(equalTo: topImageContainerView.centerYAnchor),
bearImageView.heightAnchor.constraint(equalTo: heightAnchor, multiplier: 0.42),
textDescriptor.topAnchor.constraint(equalTo: topImageContainerView.bottomAnchor),
textDescriptor.leftAnchor.constraint(equalTo: leftAnchor, constant: 20),
textDescriptor.rightAnchor.constraint(equalTo: rightAnchor, constant: -20),
textDescriptor.bottomAnchor.constraint(equalTo: bottomAnchor)
])
}

}
Loading

0 comments on commit d1f544f

Please sign in to comment.