Skip to content

Commit

Permalink
Version 1.5.2
Browse files Browse the repository at this point in the history
Merge pull request #41 from ChoiysApple/Develop
  • Loading branch information
ChoiysApple authored Aug 3, 2021
2 parents 77f4f3f + bd30997 commit f054b50
Show file tree
Hide file tree
Showing 15 changed files with 125 additions and 24 deletions.
8 changes: 4 additions & 4 deletions Popcat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -488,15 +488,15 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = ZW6466CHF4;
INFOPLIST_FILE = Popcat/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.1;
MARKETING_VERSION = 1.5.2;
PRODUCT_BUNDLE_IDENTIFIER = com.choiysapple.MyPopcat;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -513,15 +513,15 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = ZW6466CHF4;
INFOPLIST_FILE = Popcat/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.1;
MARKETING_VERSION = 1.5.2;
PRODUCT_BUNDLE_IDENTIFIER = com.choiysapple.MyPopcat;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"images" : [
{
"filename" : "drag.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "drag-2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 27 additions & 1 deletion Popcat/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,32 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</label>
<stackView opaque="NO" contentMode="scaleAspectFill" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Fix-rz-S2t">
<rect key="frame" x="54.666666666666657" y="630" width="304.66666666666674" height="98.333333333333371"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="swipe_up_main" translatesAutoresizingMaskIntoConstraints="NO" id="9HS-PI-4ts">
<rect key="frame" x="0.0" y="0.0" width="98.333333333333329" height="98.333333333333329"/>
<constraints>
<constraint firstAttribute="width" secondItem="9HS-PI-4ts" secondAttribute="height" id="Spq-OV-3nY"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="Swipe up!" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="MAe-Xt-BqO" userLabel="Swipe up!">
<rect key="frame" x="108.33333333333333" y="26.333333333333371" width="196.33333333333337" height="45.333333333333343"/>
<fontDescription key="fontDescription" name="Avenir-Medium" family="Avenir" pointSize="33"/>
<color key="textColor" name="Color"/>
<color key="highlightedColor" name="Color"/>
</label>
</subviews>
<constraints>
<constraint firstItem="MAe-Xt-BqO" firstAttribute="width" secondItem="9HS-PI-4ts" secondAttribute="width" multiplier="2" id="FHq-pf-zCy"/>
</constraints>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" name="BgColor"/>
<gestureRecognizers/>
<constraints>
<constraint firstItem="Fix-rz-S2t" firstAttribute="width" relation="lessThanOrEqual" secondItem="Dr2-Yn-Uf5" secondAttribute="width" multiplier="1.2" id="0QX-CZ-tJq"/>
<constraint firstAttribute="bottom" secondItem="Dr2-Yn-Uf5" secondAttribute="bottom" constant="-20" id="1zG-kl-ghQ">
<variation key="heightClass=compact" constant="40"/>
</constraint>
Expand All @@ -57,12 +78,14 @@
<constraint firstItem="Dr2-Yn-Uf5" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" multiplier="0.5" id="BET-t6-HRq"/>
<constraint firstItem="Dr2-Yn-Uf5" firstAttribute="centerY" secondItem="6Tk-OE-BBY" secondAttribute="centerY" id="ICr-ao-fQY"/>
<constraint firstItem="ayo-go-8WJ" firstAttribute="top" relation="greaterThanOrEqual" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="10" id="IGU-FY-knl"/>
<constraint firstItem="Fix-rz-S2t" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="Llf-E9-Ub7"/>
<constraint firstItem="Dr2-Yn-Uf5" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" constant="20" id="QSd-bn-B7i">
<variation key="heightClass=compact" constant="40"/>
</constraint>
<constraint firstItem="ayo-go-8WJ" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="UYb-au-xby"/>
<constraint firstItem="Dr2-Yn-Uf5" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="cvR-uC-Hua"/>
<constraint firstItem="Dr2-Yn-Uf5" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="cxD-FJ-Phy"/>
<constraint firstItem="Fix-rz-S2t" firstAttribute="top" secondItem="Dr2-Yn-Uf5" secondAttribute="bottom" constant="50" id="eiD-tm-XoJ"/>
<constraint firstItem="ayo-go-8WJ" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="ibf-uc-j00"/>
<constraint firstItem="Dr2-Yn-Uf5" firstAttribute="top" secondItem="ayo-go-8WJ" secondAttribute="bottom" constant="40" id="k2J-TE-qg7"/>
<constraint firstItem="Dr2-Yn-Uf5" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="obC-TS-0ah"/>
Expand Down Expand Up @@ -103,6 +126,8 @@
</view>
<connections>
<outlet property="countLabel" destination="ayo-go-8WJ" id="Tt3-Oj-NjD"/>
<outlet property="guideLabel" destination="MAe-Xt-BqO" id="OHR-UJ-eVT"/>
<outlet property="guideView" destination="Fix-rz-S2t" id="q2f-zb-q84"/>
<outlet property="popcatImage" destination="Dr2-Yn-Uf5" id="9Gq-39-jEH"/>
<segue destination="2ZR-lF-THp" kind="presentation" identifier="mainToSettings" modalPresentationStyle="fullScreen" id="gJe-gH-66X"/>
</connections>
Expand All @@ -114,7 +139,7 @@
</connections>
</swipeGestureRecognizer>
</objects>
<point key="canvasLocation" x="-165.42056074766353" y="97.192224622030238"/>
<point key="canvasLocation" x="-166.66666666666669" y="97.098214285714278"/>
</scene>
<!--Cat Tower Veiw Controller-->
<scene sceneID="zKz-ye-YOC">
Expand Down Expand Up @@ -493,6 +518,7 @@
<image name="arrow.backward" catalog="system" width="128" height="98"/>
<image name="gearshape.fill" catalog="system" width="128" height="121"/>
<image name="popcat_closed" width="655" height="655"/>
<image name="swipe_up_main" width="170.66667175292969" height="170.66667175292969"/>
<namedColor name="AccentColor">
<color red="0.45500001311302185" green="0.28600001335144043" blue="0.2630000114440918" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
Expand Down
3 changes: 1 addition & 2 deletions Popcat/Contoller/CatTowerVeiwController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ class CatTowerVeiwController: UIViewController {

if !dataManager.getIsNotInitialCatTower() {
getOnboardingViewController(onboardingDataList: OnboardingData.catTowerView.onboardingDataList).presentFrom(self, animated: true)
dataManager.setIsNotInitialCatTower(isFirst: true)
dataManager.setIsNotInitialLaunch(isFirst: true)
dataManager.setIsNotInitialCatTower(isNotFirst: true)
}


Expand Down
30 changes: 21 additions & 9 deletions Popcat/Contoller/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class MainViewController: UIViewController {
//MARK: IBOutlet
@IBOutlet weak var popcatImage: UIImageView!
@IBOutlet weak var countLabel: UILabel!
@IBOutlet weak var guideLabel: UILabel!
@IBOutlet weak var guideView: UIStackView!



//MARK: touchEventImage
Expand All @@ -27,30 +30,35 @@ class MainViewController: UIViewController {
// Timer related
private let imageDelay = 0.08
private var timer = Timer()
private var isNotFirstLaunch = true

override func viewDidLoad() {
super.viewDidLoad()

self.navigationController?.setNavigationBarHidden(true, animated: false)



}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)


// Display onboarding
if !dataManager.getIsNotInitialLaunch() {
getOnboardingViewController(onboardingDataList: OnboardingData.mainView.onboardingDataList).presentFrom(self, animated: true)
dataManager.setIsNotInitialLaunch(isFirst: true)
dataManager.setIsNotInitialLaunch(isNotFirst: true)
}

// Guide label settings
if dataManager.getIsNotInitialCatTower() {
guideView.isHidden = true
} else {
guideLabel.attributedText = NSAttributedString(string: "Swipe up!".localized)
guideView.isHidden = false
}

updateViewSettings()
touchEvent.delegate = self




}

}
Expand Down Expand Up @@ -121,20 +129,24 @@ extension MainViewController {

// apply current settings
func updateViewSettings() {

// count label settings
countLabel.isHidden = !dataManager.getPopVisibility()
countLabel.text = String(dataManager.getPopCount())


let catData = dataManager.getCatData()
touchUpImageSource = UIImage(named: catData.closedImageName)
touchDownImageSource = UIImage(named: catData.openedImageName)
popcatImage.image = touchUpImageSource

let popSoundVolume = dataManager.getPopSoundVolume()

touchEvent = TouchEventManager(source: catData.audioSourceName, volume: popSoundVolume)
timer.invalidate()


}


}

12 changes: 6 additions & 6 deletions Popcat/Model/UserDataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ class UserDataManager {
userDefaults.set(popVisibility, forKey: UserDataKey.popCountVisibility)
}

func setIsNotInitialLaunch(isFirst: Bool) {
userDefaults.set(isFirst, forKey: UserDataKey.isNotFirstLaunch)
func setIsNotInitialLaunch(isNotFirst: Bool) {
userDefaults.set(isNotFirst, forKey: UserDataKey.isNotFirstLaunch)
}

func setIsNotInitialCatTower(isFirst: Bool) {
userDefaults.set(isFirst, forKey: UserDataKey.isNotFirstCatTower)
func setIsNotInitialCatTower(isNotFirst: Bool) {
userDefaults.set(isNotFirst, forKey: UserDataKey.isNotFirstCatTower)
}

func setPopSoundVolume(volume: Float){
Expand Down Expand Up @@ -89,7 +89,7 @@ class UserDataManager {
if isKeyPresentInUserDefaults(key: UserDataKey.isNotFirstLaunch){
return userDefaults.bool(forKey: UserDataKey.isNotFirstLaunch)
} else {
setIsNotInitialLaunch(isFirst: false)
setIsNotInitialLaunch(isNotFirst: false)
return false
}
}
Expand All @@ -99,7 +99,7 @@ class UserDataManager {
if isKeyPresentInUserDefaults(key: UserDataKey.isNotFirstCatTower){
return userDefaults.bool(forKey: UserDataKey.isNotFirstCatTower)
} else {
setIsNotInitialLaunch(isFirst: false)
setIsNotInitialCatTower(isNotFirst: false)
return false
}
}
Expand Down
4 changes: 2 additions & 2 deletions Popcat/View/CatTowerCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class CatTowerCell: UICollectionViewCell {
self.cellView.backgroundColor = UIColor(named: "BgColor")

// Make border of CollectionView Cell for selected Cell
if currentCatName == catData.catName.localized {
self.cellView.layer.borderWidth = 2.0
if currentCatName.localized == catData.catName.localized {
self.cellView.layer.borderWidth = 2.5
} else {
self.cellView.layer.borderWidth = 0.75
}
Expand Down
2 changes: 2 additions & 0 deletions Popcat/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@
"Bubble Pop" = "Bubble Pop";
"Pop Kitten" = "Pop Kitten";
"Cosmic Red" = "Cosmic Cat";

"Swipe up!" = "Swipe up!";
6 changes: 6 additions & 0 deletions Popcat/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
"Next" = "다음";



"Swipe up!" = "위로 스와이프!";



// Cat Tower
"Show Pop count" = "탭 횟수 표시";
"Done" = "완료";
Expand Down Expand Up @@ -73,3 +78,4 @@
"Bubble Pop" = "풍선껌 고앵";
"Pop Kitten" = "팝 아깽이";
"Cosmic Red" = "우주적 고양이";

0 comments on commit f054b50

Please sign in to comment.