Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Feature/app icon change ee (#458)
Browse files Browse the repository at this point in the history
* Add easter egg button

* Change Button Design

* - action sheet to profile view
- alternative applogos

* setup app icon change basics

* added icon change functionality

* update version text
  • Loading branch information
AW-tum authored Jul 7, 2022
1 parent edfe4a3 commit 1a4c760
Show file tree
Hide file tree
Showing 28 changed files with 249 additions and 1 deletion.
48 changes: 48 additions & 0 deletions Campus-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@
36FF90742773BFC300F4C785 /* FirebaseAnalyticsSwift-Beta in Frameworks */ = {isa = PBXBuildFile; productRef = 36FF90732773BFC300F4C785 /* FirebaseAnalyticsSwift-Beta */; };
36FF90762773BFC300F4C785 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 36FF90752773BFC300F4C785 /* FirebaseCrashlytics */; };
41D55D6E27A2EFB200DE7155 /* LRUCache in Frameworks */ = {isa = PBXBuildFile; productRef = 41D55D6D27A2EFB200DE7155 /* LRUCache */; };
41E2B82E2864D193005B5E72 /* 3D@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41E2B8242864D192005B5E72 /* 3D@2x.png */; };
41E2B82F2864D193005B5E72 /* 3D@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41E2B8252864D192005B5E72 /* 3D@3x.png */; };
41E2B8302864D193005B5E72 /* default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41E2B8262864D192005B5E72 /* default@2x.png */; };
41E2B8312864D193005B5E72 /* default@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41E2B8272864D192005B5E72 /* default@3x.png */; };
41E2B8322864D193005B5E72 /* outline@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41E2B8282864D192005B5E72 /* outline@3x.png */; };
41E2B8332864D193005B5E72 /* pride@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41E2B8292864D192005B5E72 /* pride@2x.png */; };
41E2B8342864D193005B5E72 /* white@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41E2B82A2864D192005B5E72 /* white@2x.png */; };
41E2B8352864D193005B5E72 /* white@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41E2B82B2864D192005B5E72 /* white@3x.png */; };
41E2B8362864D193005B5E72 /* pride@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41E2B82C2864D192005B5E72 /* pride@3x.png */; };
41E2B8372864D193005B5E72 /* outline@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 41E2B82D2864D192005B5E72 /* outline@2x.png */; };
97270F5A27AB2A4900BB25E4 /* Array+Rearrange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97270F5927AB2A4900BB25E4 /* Array+Rearrange.swift */; };
974D5B9A27E5E9CB00FD7B11 /* GlowBorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 974D5B9927E5E9CB00FD7B11 /* GlowBorder.swift */; };
97997AE127722D660079F809 /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = 97997AE027722D660079F809 /* Alamofire */; };
Expand Down Expand Up @@ -400,6 +410,16 @@
36FAE364277472EF00628799 /* LoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewModel.swift; sourceTree = "<group>"; };
36FF90642773BB8100F4C785 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
36FF906E2773BE8100F4C785 /* AuthenticationHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthenticationHandler.swift; sourceTree = "<group>"; };
41E2B8242864D192005B5E72 /* 3D@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "3D@2x.png"; sourceTree = "<group>"; };
41E2B8252864D192005B5E72 /* 3D@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "3D@3x.png"; sourceTree = "<group>"; };
41E2B8262864D192005B5E72 /* default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "default@2x.png"; sourceTree = "<group>"; };
41E2B8272864D192005B5E72 /* default@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "default@3x.png"; sourceTree = "<group>"; };
41E2B8282864D192005B5E72 /* outline@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "outline@3x.png"; sourceTree = "<group>"; };
41E2B8292864D192005B5E72 /* pride@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pride@2x.png"; sourceTree = "<group>"; };
41E2B82A2864D192005B5E72 /* white@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "white@2x.png"; sourceTree = "<group>"; };
41E2B82B2864D192005B5E72 /* white@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "white@3x.png"; sourceTree = "<group>"; };
41E2B82C2864D192005B5E72 /* pride@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pride@3x.png"; sourceTree = "<group>"; };
41E2B82D2864D192005B5E72 /* outline@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "outline@2x.png"; sourceTree = "<group>"; };
97270F5927AB2A4900BB25E4 /* Array+Rearrange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Array+Rearrange.swift"; sourceTree = "<group>"; };
974D5B9927E5E9CB00FD7B11 /* GlowBorder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlowBorder.swift; sourceTree = "<group>"; };
97F8A79227E641570099EE83 /* AcademicDegree.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AcademicDegree.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -906,6 +926,7 @@
227FBB492762AC440062FEC3 /* Info.plist */,
36203E7D2761B9D000C24658 /* Localizable.strings */,
366F0E8727580CFD0091651D /* Assets.xcassets */,
41E2B8232864D192005B5E72 /* Icons */,
1F542452285CA081008363BC /* VideoAssets */,
366F0E8C27580CFD0091651D /* Persistence.swift */,
36AD5CFD27BA064E00DAE143 /* GoogleService-Info.plist */,
Expand Down Expand Up @@ -1279,6 +1300,23 @@
path = Extensions;
sourceTree = "<group>";
};
41E2B8232864D192005B5E72 /* Icons */ = {
isa = PBXGroup;
children = (
41E2B8242864D192005B5E72 /* 3D@2x.png */,
41E2B8252864D192005B5E72 /* 3D@3x.png */,
41E2B8262864D192005B5E72 /* default@2x.png */,
41E2B8272864D192005B5E72 /* default@3x.png */,
41E2B8282864D192005B5E72 /* outline@3x.png */,
41E2B8292864D192005B5E72 /* pride@2x.png */,
41E2B82A2864D192005B5E72 /* white@2x.png */,
41E2B82B2864D192005B5E72 /* white@3x.png */,
41E2B82C2864D192005B5E72 /* pride@3x.png */,
41E2B82D2864D192005B5E72 /* outline@2x.png */,
);
path = Icons;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -1408,11 +1446,21 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
41E2B82E2864D193005B5E72 /* 3D@2x.png in Resources */,
41E2B8332864D193005B5E72 /* pride@2x.png in Resources */,
41E2B8312864D193005B5E72 /* default@3x.png in Resources */,
41E2B8372864D193005B5E72 /* outline@2x.png in Resources */,
366F0E8B27580CFD0091651D /* Preview Assets.xcassets in Resources */,
41E2B82F2864D193005B5E72 /* 3D@3x.png in Resources */,
41E2B8322864D193005B5E72 /* outline@3x.png in Resources */,
36AD5CFE27BA064E00DAE143 /* GoogleService-Info.plist in Resources */,
41E2B8342864D193005B5E72 /* white@2x.png in Resources */,
1F54244F285CA059008363BC /* token-tutorial.mov in Resources */,
36203E7F2761B9D000C24658 /* Localizable.strings in Resources */,
366F0E8827580CFD0091651D /* Assets.xcassets in Resources */,
41E2B8302864D193005B5E72 /* default@2x.png in Resources */,
41E2B8352864D193005B5E72 /* white@3x.png in Resources */,
41E2B8362864D193005B5E72 /* pride@3x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Binary file added Campus-iOS/Assets.xcassets/3D.imageset/3D@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Campus-iOS/Assets.xcassets/3D.imageset/3D@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions Campus-iOS/Assets.xcassets/3D.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "3D@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "3D@3x.png",
"idiom" : "universal",
"scale" : "3x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
22 changes: 22 additions & 0 deletions Campus-iOS/Assets.xcassets/default.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "default@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "default@3x.png",
"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.
22 changes: 22 additions & 0 deletions Campus-iOS/Assets.xcassets/outline.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "outline@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "outline@3x.png",
"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.
22 changes: 22 additions & 0 deletions Campus-iOS/Assets.xcassets/pride.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "pride@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pride@3x.png",
"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.
22 changes: 22 additions & 0 deletions Campus-iOS/Assets.xcassets/white.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "white@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "white@3x.png",
"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.
Binary file added Campus-iOS/Icons/3D@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Campus-iOS/Icons/3D@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Campus-iOS/Icons/default@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Campus-iOS/Icons/default@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Campus-iOS/Icons/outline@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Campus-iOS/Icons/outline@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Campus-iOS/Icons/pride@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Campus-iOS/Icons/pride@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Campus-iOS/Icons/white@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Campus-iOS/Icons/white@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions Campus-iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,61 @@
</dict>
<key>NSCalendarsUsageDescription</key>
<string>TUM Campus App contains a calendar showing university events</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundleAlternateIcons</key>
<dict>
<key>3D</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>3D</string>
</array>
</dict>
<key>inverted</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>white</string>
</array>
</dict>
<key>outline</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>outline</string>
</array>
</dict>
<key>pride</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>pride</string>
</array>
</dict>
</dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconName</key>
<string></string>
<key>CFBundleIconFiles</key>
<array>
<string></string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>UINewsstandIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string></string>
</array>
<key>UINewsstandBindingType</key>
<string>UINewsstandBindingTypeMagazine</string>
<key>UINewsstandBindingEdge</key>
<string>UINewsstandBindingEdgeLeft</string>
</dict>
</dict>
</dict>
</plist>
32 changes: 31 additions & 1 deletion Campus-iOS/ProfileComponent/View/ProfileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
import SwiftUI

struct ProfileView: View {
@State var showActionSheet = false
@ObservedObject var model: Model
@AppStorage("useBuildInWebView") var useBuildInWebView: Bool = true
@AppStorage("calendarWeekDays") var calendarWeekDays: Int = 7

var body: some View {

NavigationView {
Expand Down Expand Up @@ -123,6 +124,35 @@ struct ProfileView: View {
Spacer()
}
}

Section() {
var i = 0
Button(action: {
i += 1
if i == 5 {
i = 0
self.showActionSheet = true
}
}) {
HStack {
Spacer()
Text("Version 4.0").foregroundColor(Color.black)
Spacer()
}
}
}
.actionSheet(isPresented: self.$showActionSheet) {
//ActionSheet(title: Text("Choose Speaker"), buttons: self.actionSheetButtons)
ActionSheet(title: Text("Change background"), message: Text("Select a new color"), buttons: [
.default(Text("Default 🎓")) { UIApplication.shared.setAlternateIconName(nil) },
.default(Text("Inverted 🔄")) { UIApplication.shared.setAlternateIconName("inverted") },
.default(Text("Pride 🏳️‍🌈")) { UIApplication.shared.setAlternateIconName("pride") },
.default(Text("3D 📐")) { UIApplication.shared.setAlternateIconName("3D") },
.default(Text("Outline 🖍")) { UIApplication.shared.setAlternateIconName("outline") },
.cancel()
])
}
.listRowBackground(Color.clear)
}
.sheet(isPresented: $model.isLoginSheetPresented) {
NavigationView {
Expand Down

0 comments on commit 1a4c760

Please sign in to comment.