Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix image picker #63

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4fcaab6
Adding logo test
jxeyallen Sep 2, 2024
83ca9f9
Merge pull request #1 from rokesby/Logo
maryashariq Sep 2, 2024
96f4a25
added login button
maryashariq Sep 2, 2024
df2d0f3
added login button
maryashariq Sep 2, 2024
8afbe48
Add page structure
santy1315 Sep 2, 2024
8d7eae3
Merge pull request #2 from rokesby/create-pages
jxeyallen Sep 2, 2024
110047b
Welcome Page updated design and styling
jxeyallen Sep 2, 2024
f08c7cb
Further styling changes
jxeyallen Sep 2, 2024
2a47d37
For changes
jxeyallen Sep 2, 2024
de8d94f
Final Styling changes
jxeyallen Sep 2, 2024
ab301dc
Merge pull request #3 from rokesby/Welcome-Page
rokesby Sep 3, 2024
1fc70f3
Spacer Changes
jxeyallen Sep 3, 2024
03c6e30
Further changes
jxeyallen Sep 3, 2024
cc6944a
Login Page Styling
jxeyallen Sep 3, 2024
f39e8eb
Adding style for login button
jxeyallen Sep 3, 2024
e6592f8
Merge pull request #4 from rokesby/Welcome-Page
rokesby Sep 3, 2024
f0861e6
first draft of user profile page
JohnK02 Sep 3, 2024
5d161ac
Merge remote-tracking branch 'origin' into UserProfile
JohnK02 Sep 3, 2024
16716ca
Changes
jxeyallen Sep 3, 2024
cdc8950
Merge pull request #5 from rokesby/Welcome-Page
santy1315 Sep 3, 2024
598d239
added basic signup form
maryashariq Sep 3, 2024
b05f76b
Added functionality for Login button to navigate to login page
jxeyallen Sep 3, 2024
6cd3bd4
starter for feed page structure
rokesby Sep 3, 2024
509cc13
Merge pull request #6 from rokesby/Homepage-1
JohnK02 Sep 3, 2024
f4cd8bc
upload image functionality for signup
maryashariq Sep 3, 2024
b9ae52f
Merge pull request #7 from rokesby/Welcome-Page
JohnK02 Sep 3, 2024
99f5276
committing changes to merge from main
JohnK02 Sep 3, 2024
94a4021
Merge remote-tracking branch 'origin' into UserProfile
JohnK02 Sep 3, 2024
6c05fad
Merge branch 'main' into signup-view
santy1315 Sep 3, 2024
5645fe6
Merge pull request #8 from rokesby/signup-view
santy1315 Sep 3, 2024
5a0e5d5
Revert "Merge pull request #8 from rokesby/signup-view"
maryashariq Sep 3, 2024
3e185e8
committing to create main backup
JohnK02 Sep 3, 2024
0136492
create-post-page
santy1315 Sep 3, 2024
ca30852
upload image
santy1315 Sep 3, 2024
9ee4981
add image
santy1315 Sep 4, 2024
3207ad2
FIXED THE PBXPROJ FILE!!!!
maryashariq Sep 4, 2024
f385d3b
Merge pull request #10 from rokesby/create-post-page
rokesby Sep 4, 2024
3bb9700
Fixing image Picker
jxeyallen Sep 4, 2024
d7b2afa
fix-image-picker
santy1315 Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.xcworkspace/xcuserdata/
DerivedData/
build/
*DS_Store*
40 changes: 38 additions & 2 deletions MobileAcebook.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
AE5D85E32AC9AFD2009680C6 /* MockAuthenticationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE5D85E22AC9AFD2009680C6 /* MockAuthenticationService.swift */; };
AE5D85E62AC9B077009680C6 /* AuthenticationServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE5D85E52AC9B077009680C6 /* AuthenticationServiceProtocol.swift */; };
AE5D85E82AC9B29A009680C6 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE5D85E72AC9B29A009680C6 /* User.swift */; };
F12EC4E32C873A1800467C46 /* ImagePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = F12EC4E22C873A1700467C46 /* ImagePicker.swift */; };
F52702832C872E7900C5B8E7 /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = F52702822C872E7900C5B8E7 /* Post.swift */; };
F52702852C872FB500C5B8E7 /* PostsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F52702842C872FB500C5B8E7 /* PostsViewModel.swift */; };
F8E51E812C861051005418F9 /* SignUpPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E51E802C861051005418F9 /* SignUpPageView.swift */; };
F8E51E832C861062005418F9 /* LoginPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E51E822C861062005418F9 /* LoginPageView.swift */; };
F8E51E852C861071005418F9 /* FeedPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E51E842C861071005418F9 /* FeedPageView.swift */; };
F8E51E872C861086005418F9 /* CreatePostsPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E51E862C861086005418F9 /* CreatePostsPageView.swift */; };
F8E51E892C861095005418F9 /* ProfilePageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E51E882C861095005418F9 /* ProfilePageView.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -54,6 +62,14 @@
AE5D85E22AC9AFD2009680C6 /* MockAuthenticationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockAuthenticationService.swift; sourceTree = "<group>"; };
AE5D85E52AC9B077009680C6 /* AuthenticationServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationServiceProtocol.swift; sourceTree = "<group>"; };
AE5D85E72AC9B29A009680C6 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
F12EC4E22C873A1700467C46 /* ImagePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImagePicker.swift; sourceTree = "<group>"; };
F52702822C872E7900C5B8E7 /* Post.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Post.swift; sourceTree = "<group>"; };
F52702842C872FB500C5B8E7 /* PostsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostsViewModel.swift; sourceTree = "<group>"; };
F8E51E802C861051005418F9 /* SignUpPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpPageView.swift; sourceTree = "<group>"; };
F8E51E822C861062005418F9 /* LoginPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginPageView.swift; sourceTree = "<group>"; };
F8E51E842C861071005418F9 /* FeedPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedPageView.swift; sourceTree = "<group>"; };
F8E51E862C861086005418F9 /* CreatePostsPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatePostsPageView.swift; sourceTree = "<group>"; };
F8E51E882C861095005418F9 /* ProfilePageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfilePageView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -62,7 +78,7 @@
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
runOnlyForDeploymentPostprocessing = 0;
};
AE5D85B92AC8A224009680C6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
Expand Down Expand Up @@ -111,6 +127,12 @@
AE5D85B32AC8A224009680C6 /* Assets.xcassets */,
AE5D85B52AC8A224009680C6 /* Preview Content */,
AE5D85D92AC8A337009680C6 /* WelcomePageView.swift */,
F8E51E802C861051005418F9 /* SignUpPageView.swift */,
F8E51E822C861062005418F9 /* LoginPageView.swift */,
F8E51E842C861071005418F9 /* FeedPageView.swift */,
F8E51E862C861086005418F9 /* CreatePostsPageView.swift */,
F8E51E882C861095005418F9 /* ProfilePageView.swift */,
F12EC4E22C873A1700467C46 /* ImagePicker.swift */,
);
path = MobileAcebook;
sourceTree = "<group>";
Expand Down Expand Up @@ -162,6 +184,8 @@
isa = PBXGroup;
children = (
AE5D85E72AC9B29A009680C6 /* User.swift */,
F52702822C872E7900C5B8E7 /* Post.swift */,
F52702842C872FB500C5B8E7 /* PostsViewModel.swift */,
);
path = Models;
sourceTree = "<group>";
Expand Down Expand Up @@ -238,7 +262,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1420;
LastUpgradeCheck = 1420;
LastUpgradeCheck = 1540;
TargetAttributes = {
AE5D85AB2AC8A221009680C6 = {
CreatedOnToolsVersion = 14.2;
Expand Down Expand Up @@ -305,8 +329,16 @@
buildActionMask = 2147483647;
files = (
AE5D85E12AC9AFA9009680C6 /* AuthenticationService.swift in Sources */,
F52702832C872E7900C5B8E7 /* Post.swift in Sources */,
F8E51E892C861095005418F9 /* ProfilePageView.swift in Sources */,
F8E51E852C861071005418F9 /* FeedPageView.swift in Sources */,
AE5D85E62AC9B077009680C6 /* AuthenticationServiceProtocol.swift in Sources */,
F8E51E832C861062005418F9 /* LoginPageView.swift in Sources */,
AE5D85B02AC8A221009680C6 /* MobileAcebookApp.swift in Sources */,
F8E51E812C861051005418F9 /* SignUpPageView.swift in Sources */,
F12EC4E32C873A1800467C46 /* ImagePicker.swift in Sources */,
F52702852C872FB500C5B8E7 /* PostsViewModel.swift in Sources */,
F8E51E872C861086005418F9 /* CreatePostsPageView.swift in Sources */,
AE5D85E82AC9B29A009680C6 /* User.swift in Sources */,
AE5D85DA2AC8A337009680C6 /* WelcomePageView.swift in Sources */,
);
Expand Down Expand Up @@ -383,6 +415,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -443,6 +476,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -469,6 +503,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"MobileAcebook/Preview Content\"";
DEVELOPMENT_TEAM = 93ARFXYW45;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand Down Expand Up @@ -497,6 +532,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"MobileAcebook/Preview Content\"";
DEVELOPMENT_TEAM = 93ARFXYW45;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand Down
114 changes: 114 additions & 0 deletions MobileAcebook.xcodeproj/xcshareddata/xcschemes/MobileAcebook.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AE5D85AB2AC8A221009680C6"
BuildableName = "MobileAcebook.app"
BlueprintName = "MobileAcebook"
ReferencedContainer = "container:MobileAcebook.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:MobileAcebook.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AE5D85BB2AC8A224009680C6"
BuildableName = "MobileAcebookTests.xctest"
BlueprintName = "MobileAcebookTests"
ReferencedContainer = "container:MobileAcebook.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "YES"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AE5D85C52AC8A224009680C6"
BuildableName = "MobileAcebookUITests.xctest"
BlueprintName = "MobileAcebookUITests"
ReferencedContainer = "container:MobileAcebook.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AE5D85AB2AC8A221009680C6"
BuildableName = "MobileAcebook.app"
BlueprintName = "MobileAcebook"
ReferencedContainer = "container:MobileAcebook.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "IDEPreferLogStreaming"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AE5D85AB2AC8A221009680C6"
BuildableName = "MobileAcebook.app"
BlueprintName = "MobileAcebook"
ReferencedContainer = "container:MobileAcebook.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"colors" : [
{
"color" : {
"color-space" : "display-p3",
"components" : {
"alpha" : "1.000",
"blue" : "0.697",
"green" : "0.696",
"red" : "0.671"
}
},
"idiom" : "universal"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "makers-logo.png",
"filename" : "Screenshot 2024-09-02 at 15.59.50.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
55 changes: 55 additions & 0 deletions MobileAcebook/CreatePostsPageView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import SwiftUI
import UIKit


// The main view
struct CreatePostsPageView: View {
@State private var postMessage = ""
@State private var selectedImage: UIImage? = nil
@State private var isImagePickerPresented = false

var body: some View {
VStack(alignment: .center) {
// Display the selected image, or a button to select one
if let image = selectedImage {
Image(uiImage: image)
.resizable()
.scaledToFit()
.frame(width: 200, height: 200)
.padding()
} else {
Button(action: {
isImagePickerPresented = true
}) {
TextField("What's on your mind...", text: $postMessage)
.padding()
// .frame(width:100, height:100)
.scrollContentBackground(.hidden)
}
.padding()
}

Form {
Section {
// TextField("What's on your mind.", text: $postMessage)
Text("Select an Image")
.foregroundColor(.blue)
}
Button("Submit") {
// Action for the button
}
}
}
.padding()
.sheet(isPresented: $isImagePickerPresented) {
ImagePicker(image: $selectedImage)
}
}
}

// Preview
struct CreatePostsPageView_Previews: PreviewProvider {
static var previews: some View {
CreatePostsPageView()
}
}
Loading