Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

About View Update #401

Merged
merged 2 commits into from Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
58 changes: 57 additions & 1 deletion Powerup/AboutViewController.swift
Expand Up @@ -3,6 +3,8 @@ import UIKit
class AboutViewController: UIViewController {

// MARK: Action
@IBOutlet weak var textView: UITextView!

@IBAction func homeButtonTouched(_ sender: UIButton) {
dismiss(animated: true, completion: nil)
}
Expand All @@ -11,6 +13,60 @@ class AboutViewController: UIViewController {
addPopup()
}

override func viewDidLoad() {
super.viewDidLoad()

aboutText(text: textForAboutView)

}

func aboutText(text: String) {

let attributedString = NSMutableAttributedString(string: textForAboutView)

let aboutColor = UIColor(red: 74/255, green: 160/255, blue: 166/255, alpha: 1.0)
let textFont = UIFont(name: "HelveticaNeue", size: 20)!
let headingFont = UIFont(name: "HelveticaNeue-Bold", size: 24)!

let attributes0: [NSAttributedString.Key : Any] = [
.foregroundColor: aboutColor,
.font: headingFont
]
attributedString.addAttributes(attributes0, range: NSRange(location: 0, length: 8))

let attributes2: [NSAttributedString.Key : Any] = [
.foregroundColor: aboutColor,
.font: textFont
]
attributedString.addAttributes(attributes2, range: NSRange(location: 10, length: 578))

let attributes4: [NSAttributedString.Key : Any] = [
.foregroundColor: aboutColor,
.font: headingFont
]
attributedString.addAttributes(attributes4, range: NSRange(location: 590, length: 22))

let attributes6: [NSAttributedString.Key : Any] = [
.foregroundColor: aboutColor,
.font: textFont
]
attributedString.addAttributes(attributes6, range: NSRange(location: 614, length: 884))

let attributes8: [NSAttributedString.Key : Any] = [
.foregroundColor: aboutColor,
.font: headingFont
]
attributedString.addAttributes(attributes8, range: NSRange(location: 1500, length: 32))

let attributes10: [NSAttributedString.Key : Any] = [
.foregroundColor: aboutColor,
.font: textFont
]
attributedString.addAttributes(attributes10, range: NSRange(location: 1534, length: 508))
textView.attributedText = attributedString

}

func addPopup() {
let model = PopupEvent(topText: "Made with ♥",
botText: "by Systers Open Source",
Expand All @@ -20,5 +76,5 @@ class AboutViewController: UIViewController {
let popup: PopupEventPlayer = PopupEventPlayer(model)
self.view.addSubview(popup)
}

}

19 changes: 7 additions & 12 deletions Powerup/Base.lproj/Main.storyboard
Expand Up @@ -30,14 +30,6 @@
<constraints>
<constraint firstAttribute="width" constant="400" id="D4I-aU-tqT"/>
</constraints>
<string key="text">The Game
PowerUp is an educational choose-your-own-adventure game for girls between the age of 12 and 14. The game consists of different scenarios in which the user can choose between multiple answers and thereby lead the conversation into different directions. The user can create a personalized avatar by choosing clothes, hair eye and skin color. Later on the avatar can be further customized and other accessories can be bought using points earned in the scenarios. Additional mini games contain key information surrounding reproductive health and provide a break from the storyline.

Why this app is needed
Increased exposure among preadolescents aged 12-14 to sexualized media has normalized engagement in sexual activity at younger ages. However information regarding sex is not very accessible to preadolescents. Only 65% of schools provide sex education and even less explain condom use. Having the talk at home is usually very awkward. Preadolescent girls need better options for reproductive health and self-esteem education. They are at risk for possible pregnancy and spread of sexually transmitted infection (STI), yet very little information reaches preadolescents about risk and responsibility associated with sex. Additionally, preadolescents struggle with self-esteem, which makes them vulnerable to peer and media influence. Current trends in sexual activity among preadolescents impact the economy, hurt family cohesion, affect female education, and burden healthcare systems.

How does PowerUp help teenagers?
The app uses Social and Emotional Learning (SEL) to empower middle school girls to take ownership of their health and sexual activity. It is designed to increase access to reproductive health and self-esteem education by incorporating quality and relevant information surrounding those topics and it helps concretize corresponding concepts through interactive activities. The content is based on SEL Core Competencies (Self-awareness, Self-management, Social awareness, Relationship skills, Decision making).</string>
<color key="textColor" red="0.3803921569" green="0.59999999999999998" blue="0.69288374350000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" name="Montserrat-Bold" family="Montserrat" pointSize="17"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
Expand Down Expand Up @@ -81,6 +73,9 @@
</constraints>
<viewLayoutGuide key="safeArea" id="2TS-AX-Kbm"/>
</view>
<connections>
<outlet property="textView" destination="FdT-xN-nZO" id="lM5-XK-djv"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Zwe-o9-mfo" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
Expand Down Expand Up @@ -396,7 +391,7 @@
<rect key="frame" x="279" y="140" width="91" height="173"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1rN-B1-EyF" userLabel="back button">
<rect key="frame" x="20" y="15" width="38.5" height="0.0"/>
<rect key="frame" x="20" y="15" width="77" height="0.0"/>
<state key="normal" image="left_arrow"/>
<connections>
<action selector="backButtonTouched:" destination="vCf-Jb-qhY" eventType="touchUpInside" id="gtS-ZK-i5D"/>
Expand Down Expand Up @@ -1558,7 +1553,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="endscreen_background" translatesAutoresizingMaskIntoConstraints="NO" id="GqS-kL-Xqm" userLabel="Background Image">
<rect key="frame" x="0.0" y="0.0" width="1024" height="375"/>
<rect key="frame" x="0.0" y="0.0" width="667" height="375"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="karma_star" translatesAutoresizingMaskIntoConstraints="NO" id="OdA-pZ-nes" userLabel="Karma Motif">
<rect key="frame" x="10" y="10" width="40" height="40"/>
Expand Down Expand Up @@ -1588,7 +1583,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UMB-Yq-rOx">
<rect key="frame" x="427.5" y="200.5" width="169" height="54.5"/>
<rect key="frame" x="249" y="173" width="169" height="109"/>
<constraints>
<constraint firstAttribute="width" constant="169" id="SDR-Yu-9ny"/>
</constraints>
Expand All @@ -1598,7 +1593,7 @@
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Wow! You Are Brilliant. Game Completed!!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wyS-fw-fBB">
<rect key="frame" x="274" y="154" width="476" height="27"/>
<rect key="frame" x="95.5" y="154" width="476" height="27"/>
<fontDescription key="fontDescription" name="Montserrat-Bold" family="Montserrat" pointSize="22"/>
<color key="textColor" red="0.3803921569" green="0.59999999999999998" blue="0.69411764710000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
Expand Down
4 changes: 4 additions & 0 deletions Powerup/Strings.swift
Expand Up @@ -35,3 +35,7 @@ let errorFetchingScenarioMessage = "Error fetching scenario data from database."
let errorSavingKarmaPointsMessage = "Error saving Karma points."
let errorSavingScenarioCompletionMessage = "Error saving scenario completion."
let mapMigrationAlertMessage = "If you migrate to map, current scene karma points will be lost"
let textForAboutView = "The Game\n\nPowerUp is an educational choose-your-own-adventure game for girls between the age of 12 and 14. The game consists of different scenarios in which the user can choose between multiple answers and thereby lead the conversation into different directions. The user can create a personalized avatar by choosing clothes, hair eye and skin color. Later on the avatar can be further customized and other accessories can be bought using points earned in the scenarios. Additional mini games contain key information surrounding reproductive health and provide a break from the storyline.\n\nWhy is Powerup needed?\n\nIncreased exposure among preadolescents aged 12-14 to sexualized media has normalized engagement in sexual activity at younger ages. However information regarding sex is not very accessible to preadolescents. Only 65% of schools provide sex education and even less explain condom use. Having the talk at home is usually very awkward. Preadolescent girls need better options for reproductive health and self-esteem education. They are at risk for possible pregnancy and spread of sexually transmitted infection (STI), yet very little information reaches preadolescents about risk and responsibility associated with sex. Additionally, preadolescents struggle with self-esteem, which makes them vulnerable to peer and media influence. Current trends in sexual activity among preadolescents impact the economy, hurt family cohesion, affect female education, and burden healthcare systems.\n\nHow does PowerUp help teenagers?\n\nThe app uses Social and Emotional Learning (SEL) to empower middle school girls to take ownership of their health and sexual activity. It is designed to increase access to reproductive health and self-esteem education by incorporating quality and relevant information surrounding those topics and it helps concretize corresponding concepts through interactive activities. The content is based on SEL Core Competencies (Self-awareness, Self-management, Social awareness, Relationship skills, Decision making).\n\n"