Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Application Framework is setup. No Parse Code

  • Loading branch information...
commit 813bf7978dc14abe80f9d13f126fc4938be2c23f 1 parent 01143ec
David Rodriguez authored
Showing with 856 additions and 16 deletions.
  1. +102 −8 ParsePosts.xcodeproj/project.pbxproj
  2. +7 −0 ParsePosts.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  3. BIN  ParsePosts.xcodeproj/project.xcworkspace/xcuserdata/programmerdave.xcuserdatad/UserInterfaceState.xcuserstate
  4. +85 −0 ParsePosts.xcodeproj/xcuserdata/programmerdave.xcuserdatad/xcschemes/ParsePosts.xcscheme
  5. +22 −0 ParsePosts.xcodeproj/xcuserdata/programmerdave.xcuserdatad/xcschemes/xcschememanagement.plist
  6. +1 −1  ParsePosts/AppDelegate.h
  7. +2 −5 ParsePosts/AppDelegate.m
  8. BIN  ParsePosts/Default.png
  9. BIN  ParsePosts/Default@2x.png
  10. BIN  ParsePosts/Icon-72.png
  11. BIN  ParsePosts/Icon-72@2x.png
  12. BIN  ParsePosts/Icon-Small-50.png
  13. BIN  ParsePosts/Icon-Small.png
  14. BIN  ParsePosts/Icon-Small@2x.png
  15. BIN  ParsePosts/Icon.png
  16. BIN  ParsePosts/Icon@2x.png
  17. +288 −0 ParsePosts/MainStoryboard_iPhone.storyboard
  18. +14 −0 ParsePosts/NewPostViewController.h
  19. +93 −0 ParsePosts/NewPostViewController.m
  20. +2 −2 ParsePosts/ParsePosts-Info.plist
  21. +18 −0 ParsePosts/RecentPostsTableViewController.h
  22. +76 −0 ParsePosts/RecentPostsTableViewController.m
  23. +22 −0 ParsePosts/RegistrationViewController.h
  24. +124 −0 ParsePosts/RegistrationViewController.m
  25. BIN  ParsePosts/first.png
  26. BIN  ParsePosts/first@2x.png
  27. BIN  ParsePosts/iTunesArtwork
  28. BIN  ParsePosts/second.png
  29. BIN  ParsePosts/second@2x.png
110 ParsePosts.xcodeproj/project.pbxproj
View
@@ -12,7 +12,25 @@
17D57962153620E300C7DDDE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17D57961153620E300C7DDDE /* CoreGraphics.framework */; };
17D57968153620E300C7DDDE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 17D57966153620E300C7DDDE /* InfoPlist.strings */; };
17D5796A153620E300C7DDDE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D57969153620E300C7DDDE /* main.m */; };
- 17D5796E153620E300C7DDDE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D5796D153620E300C7DDDE /* AppDelegate.m */; };
+ 17D579891536214900C7DDDE /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 17D579881536214900C7DDDE /* MainStoryboard_iPhone.storyboard */; };
+ 17D5798E153621D000C7DDDE /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D5798C153621D000C7DDDE /* Default.png */; };
+ 17D5798F153621D000C7DDDE /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D5798D153621D000C7DDDE /* Default@2x.png */; };
+ 17D57992153621F600C7DDDE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D57991153621F600C7DDDE /* AppDelegate.m */; };
+ 17D579931536233F00C7DDDE /* NewPostViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D5797F1536211A00C7DDDE /* NewPostViewController.m */; };
+ 17D579941536233F00C7DDDE /* RecentPostsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D579811536211A00C7DDDE /* RecentPostsTableViewController.m */; };
+ 17D579951536233F00C7DDDE /* RegistrationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D579831536211A00C7DDDE /* RegistrationViewController.m */; };
+ 17D579961536234A00C7DDDE /* second.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D579841536211A00C7DDDE /* second.png */; };
+ 17D579971536234A00C7DDDE /* second@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D579851536211A00C7DDDE /* second@2x.png */; };
+ 17D579981536234A00C7DDDE /* first.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D579741536211A00C7DDDE /* first.png */; };
+ 17D579991536234A00C7DDDE /* first@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D579751536211A00C7DDDE /* first@2x.png */; };
+ 17D5799A1536234A00C7DDDE /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D579761536211A00C7DDDE /* Icon-72.png */; };
+ 17D5799B1536234A00C7DDDE /* Icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D579771536211A00C7DDDE /* Icon-72@2x.png */; };
+ 17D5799C1536234A00C7DDDE /* Icon-Small-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D579781536211A00C7DDDE /* Icon-Small-50.png */; };
+ 17D5799D1536234A00C7DDDE /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D579791536211A00C7DDDE /* Icon-Small.png */; };
+ 17D5799E1536234A00C7DDDE /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D5797A1536211A00C7DDDE /* Icon-Small@2x.png */; };
+ 17D5799F1536234A00C7DDDE /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D5797B1536211A00C7DDDE /* Icon.png */; };
+ 17D579A01536234A00C7DDDE /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17D5797C1536211A00C7DDDE /* Icon@2x.png */; };
+ 17D579A11536234A00C7DDDE /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = 17D5797D1536211A00C7DDDE /* iTunesArtwork */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -20,12 +38,33 @@
17D5795D153620E300C7DDDE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
17D5795F153620E300C7DDDE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
17D57961153620E300C7DDDE /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
- 17D57965153620E300C7DDDE /* ParsePosts-Info.plist */ = {isa = PBXFileReference; path = "ParsePosts-Info.plist"; sourceTree = "<group>"; };
+ 17D57965153620E300C7DDDE /* ParsePosts-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ParsePosts-Info.plist"; sourceTree = "<group>"; };
17D57967153620E300C7DDDE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
17D57969153620E300C7DDDE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
- 17D5796B153620E300C7DDDE /* ParsePosts-Prefix.pch */ = {isa = PBXFileReference; path = "ParsePosts-Prefix.pch"; sourceTree = "<group>"; };
- 17D5796C153620E300C7DDDE /* AppDelegate.h */ = {isa = PBXFileReference; path = AppDelegate.h; sourceTree = "<group>"; };
- 17D5796D153620E300C7DDDE /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ 17D5796B153620E300C7DDDE /* ParsePosts-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ParsePosts-Prefix.pch"; sourceTree = "<group>"; };
+ 17D579741536211A00C7DDDE /* first.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = first.png; sourceTree = "<group>"; };
+ 17D579751536211A00C7DDDE /* first@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "first@2x.png"; sourceTree = "<group>"; };
+ 17D579761536211A00C7DDDE /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = "<group>"; };
+ 17D579771536211A00C7DDDE /* Icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72@2x.png"; sourceTree = "<group>"; };
+ 17D579781536211A00C7DDDE /* Icon-Small-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-50.png"; sourceTree = "<group>"; };
+ 17D579791536211A00C7DDDE /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small.png"; sourceTree = "<group>"; };
+ 17D5797A1536211A00C7DDDE /* Icon-Small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small@2x.png"; sourceTree = "<group>"; };
+ 17D5797B1536211A00C7DDDE /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
+ 17D5797C1536211A00C7DDDE /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
+ 17D5797D1536211A00C7DDDE /* iTunesArtwork */ = {isa = PBXFileReference; lastKnownFileType = file; path = iTunesArtwork; sourceTree = "<group>"; };
+ 17D5797E1536211A00C7DDDE /* NewPostViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NewPostViewController.h; sourceTree = "<group>"; };
+ 17D5797F1536211A00C7DDDE /* NewPostViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NewPostViewController.m; sourceTree = "<group>"; };
+ 17D579801536211A00C7DDDE /* RecentPostsTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RecentPostsTableViewController.h; sourceTree = "<group>"; };
+ 17D579811536211A00C7DDDE /* RecentPostsTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RecentPostsTableViewController.m; sourceTree = "<group>"; };
+ 17D579821536211A00C7DDDE /* RegistrationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RegistrationViewController.h; sourceTree = "<group>"; };
+ 17D579831536211A00C7DDDE /* RegistrationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RegistrationViewController.m; sourceTree = "<group>"; };
+ 17D579841536211A00C7DDDE /* second.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = second.png; sourceTree = "<group>"; };
+ 17D579851536211A00C7DDDE /* second@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "second@2x.png"; sourceTree = "<group>"; };
+ 17D579881536214900C7DDDE /* MainStoryboard_iPhone.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard_iPhone.storyboard; sourceTree = "<group>"; };
+ 17D5798C153621D000C7DDDE /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+ 17D5798D153621D000C7DDDE /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
+ 17D57990153621F600C7DDDE /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ 17D57991153621F600C7DDDE /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -72,8 +111,11 @@
17D57963153620E300C7DDDE /* ParsePosts */ = {
isa = PBXGroup;
children = (
- 17D5796C153620E300C7DDDE /* AppDelegate.h */,
- 17D5796D153620E300C7DDDE /* AppDelegate.m */,
+ 17D57990153621F600C7DDDE /* AppDelegate.h */,
+ 17D57991153621F600C7DDDE /* AppDelegate.m */,
+ 17D579881536214900C7DDDE /* MainStoryboard_iPhone.storyboard */,
+ 17D579871536212800C7DDDE /* Classes */,
+ 17D579861536211F00C7DDDE /* Images */,
17D57964153620E300C7DDDE /* Supporting Files */,
);
path = ParsePosts;
@@ -90,6 +132,40 @@
name = "Supporting Files";
sourceTree = "<group>";
};
+ 17D579861536211F00C7DDDE /* Images */ = {
+ isa = PBXGroup;
+ children = (
+ 17D5798C153621D000C7DDDE /* Default.png */,
+ 17D5798D153621D000C7DDDE /* Default@2x.png */,
+ 17D579841536211A00C7DDDE /* second.png */,
+ 17D579851536211A00C7DDDE /* second@2x.png */,
+ 17D579741536211A00C7DDDE /* first.png */,
+ 17D579751536211A00C7DDDE /* first@2x.png */,
+ 17D579761536211A00C7DDDE /* Icon-72.png */,
+ 17D579771536211A00C7DDDE /* Icon-72@2x.png */,
+ 17D579781536211A00C7DDDE /* Icon-Small-50.png */,
+ 17D579791536211A00C7DDDE /* Icon-Small.png */,
+ 17D5797A1536211A00C7DDDE /* Icon-Small@2x.png */,
+ 17D5797B1536211A00C7DDDE /* Icon.png */,
+ 17D5797C1536211A00C7DDDE /* Icon@2x.png */,
+ 17D5797D1536211A00C7DDDE /* iTunesArtwork */,
+ );
+ name = Images;
+ sourceTree = "<group>";
+ };
+ 17D579871536212800C7DDDE /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 17D5797E1536211A00C7DDDE /* NewPostViewController.h */,
+ 17D5797F1536211A00C7DDDE /* NewPostViewController.m */,
+ 17D579801536211A00C7DDDE /* RecentPostsTableViewController.h */,
+ 17D579811536211A00C7DDDE /* RecentPostsTableViewController.m */,
+ 17D579821536211A00C7DDDE /* RegistrationViewController.h */,
+ 17D579831536211A00C7DDDE /* RegistrationViewController.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -141,7 +217,22 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 17D579961536234A00C7DDDE /* second.png in Resources */,
+ 17D579971536234A00C7DDDE /* second@2x.png in Resources */,
+ 17D579981536234A00C7DDDE /* first.png in Resources */,
+ 17D579991536234A00C7DDDE /* first@2x.png in Resources */,
+ 17D5799A1536234A00C7DDDE /* Icon-72.png in Resources */,
+ 17D5799B1536234A00C7DDDE /* Icon-72@2x.png in Resources */,
+ 17D5799C1536234A00C7DDDE /* Icon-Small-50.png in Resources */,
+ 17D5799D1536234A00C7DDDE /* Icon-Small.png in Resources */,
+ 17D5799E1536234A00C7DDDE /* Icon-Small@2x.png in Resources */,
+ 17D5799F1536234A00C7DDDE /* Icon.png in Resources */,
+ 17D579A01536234A00C7DDDE /* Icon@2x.png in Resources */,
+ 17D579A11536234A00C7DDDE /* iTunesArtwork in Resources */,
17D57968153620E300C7DDDE /* InfoPlist.strings in Resources */,
+ 17D579891536214900C7DDDE /* MainStoryboard_iPhone.storyboard in Resources */,
+ 17D5798E153621D000C7DDDE /* Default.png in Resources */,
+ 17D5798F153621D000C7DDDE /* Default@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -152,8 +243,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 17D579931536233F00C7DDDE /* NewPostViewController.m in Sources */,
+ 17D579941536233F00C7DDDE /* RecentPostsTableViewController.m in Sources */,
+ 17D579951536233F00C7DDDE /* RegistrationViewController.m in Sources */,
17D5796A153620E300C7DDDE /* main.m in Sources */,
- 17D5796E153620E300C7DDDE /* AppDelegate.m in Sources */,
+ 17D57992153621F600C7DDDE /* AppDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7 ParsePosts.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:ParsePosts.xcodeproj">
+ </FileRef>
+</Workspace>
BIN  ...Posts.xcodeproj/project.xcworkspace/xcuserdata/programmerdave.xcuserdatad/UserInterfaceState.xcuserstate
View
Binary file not shown
85 ParsePosts.xcodeproj/xcuserdata/programmerdave.xcuserdatad/xcschemes/ParsePosts.xcscheme
View
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "17D57958153620E300C7DDDE"
+ BuildableName = "ParsePosts.app"
+ BlueprintName = "ParsePosts"
+ ReferencedContainer = "container:ParsePosts.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "17D57958153620E300C7DDDE"
+ BuildableName = "ParsePosts.app"
+ BlueprintName = "ParsePosts"
+ ReferencedContainer = "container:ParsePosts.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "17D57958153620E300C7DDDE"
+ BuildableName = "ParsePosts.app"
+ BlueprintName = "ParsePosts"
+ ReferencedContainer = "container:ParsePosts.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "17D57958153620E300C7DDDE"
+ BuildableName = "ParsePosts.app"
+ BlueprintName = "ParsePosts"
+ ReferencedContainer = "container:ParsePosts.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
22 ParsePosts.xcodeproj/xcuserdata/programmerdave.xcuserdatad/xcschemes/xcschememanagement.plist
View
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>ParsePosts.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>17D57958153620E300C7DDDE</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
2  ParsePosts/AppDelegate.h
View
@@ -1,6 +1,6 @@
//
// AppDelegate.h
-// ParsePosts
+// ParseTest
//
// Created by David Rodriguez on 4/11/12.
// Copyright (c) 2012 Forge42. All rights reserved.
7 ParsePosts/AppDelegate.m
View
@@ -1,6 +1,6 @@
//
// AppDelegate.m
-// ParsePosts
+// ParseTest
//
// Created by David Rodriguez on 4/11/12.
// Copyright (c) 2012 Forge42. All rights reserved.
@@ -20,13 +20,10 @@ - (void)dealloc
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
- self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
- self.window.backgroundColor = [UIColor whiteColor];
- [self.window makeKeyAndVisible];
return YES;
}
-
+
- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
BIN  ParsePosts/Default.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/Default@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/Icon-72.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/Icon-72@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/Icon-Small-50.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/Icon-Small.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/Icon-Small@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/Icon.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/Icon@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
288 ParsePosts/MainStoryboard_iPhone.storyboard
View
@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.1" toolsVersion="2182" systemVersion="11D50b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="4">
+ <dependencies>
+ <deployment defaultVersion="1296" identifier="iOS"/>
+ <development defaultVersion="4200" identifier="xcode"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1181"/>
+ </dependencies>
+ <scenes>
+ <!--Registration View Controller - Second-->
+ <scene sceneID="13">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="12" sceneMemberID="firstResponder"/>
+ <viewController title="Second" id="3" customClass="RegistrationViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="17" userLabel="Registration View" customClass="UIControl">
+ <rect key="frame" x="0.0" y="20" width="320" height="411"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" id="QdX-Yl-S97" userLabel="Username Field">
+ <rect key="frame" x="112" y="72" width="188" height="31"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <textInputTraits key="textInputTraits" returnKeyType="done"/>
+ <connections>
+ <action selector="endedEditing:" destination="3" eventType="editingDidEndOnExit" id="8la-Wb-Agn"/>
+ </connections>
+ </textField>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Username:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="mF3-Tn-NzO">
+ <rect key="frame" x="20" y="76" width="84" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" id="lc0-VT-DCr" userLabel="Password Field">
+ <rect key="frame" x="112" y="105" width="188" height="31"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <textInputTraits key="textInputTraits" returnKeyType="done" secureTextEntry="YES"/>
+ <connections>
+ <action selector="endedEditing:" destination="3" eventType="editingDidEndOnExit" id="1nJ-AH-GWI"/>
+ </connections>
+ </textField>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Password:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="QRK-dw-vzP">
+ <rect key="frame" x="20" y="110" width="84" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Please Login or Sign Up Below" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="3D1-FH-ell">
+ <rect key="frame" x="20" y="20" width="236" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="fj9-CA-EkM">
+ <rect key="frame" x="100" y="155" width="120" height="37"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" title="Login">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="login:" destination="3" eventType="touchUpInside" id="FVW-te-WUm"/>
+ </connections>
+ </button>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="kOk-jQ-Iie">
+ <rect key="frame" x="100" y="200" width="120" height="37"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" title="Sign Up">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="signUp:" destination="3" eventType="touchUpInside" id="3ZA-LY-3aL"/>
+ </connections>
+ </button>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <connections>
+ <action selector="resignKeyboard" destination="3" eventType="touchDown" id="uCs-TM-Z8X"/>
+ </connections>
+ </view>
+ <tabBarItem key="tabBarItem" title="Login" image="first.png" id="6"/>
+ <connections>
+ <outlet property="loginButton" destination="fj9-CA-EkM" id="4Yw-ub-Mpe"/>
+ <outlet property="passwordField" destination="lc0-VT-DCr" id="NpD-jQ-92S"/>
+ <outlet property="registrationView" destination="17" id="hT2-ya-unK"/>
+ <outlet property="signUpButton" destination="kOk-jQ-Iie" id="5Gh-IN-0JV"/>
+ <outlet property="usernameField" destination="QdX-Yl-S97" id="Zkx-vt-bGG"/>
+ <outlet property="viewTitle" destination="3D1-FH-ell" id="Fci-Ov-2Ck"/>
+ <outletCollection property="itemsToHideOnLogin" destination="mF3-Tn-NzO" id="itF-lg-4Uf"/>
+ <outletCollection property="itemsToHideOnLogin" destination="QRK-dw-vzP" id="bVC-d6-A49"/>
+ <outletCollection property="itemsToHideOnLogin" destination="kOk-jQ-Iie" id="9M6-Dn-aWH"/>
+ <outletCollection property="itemsToHideOnLogin" destination="QdX-Yl-S97" id="P3D-Hl-7nC"/>
+ <outletCollection property="itemsToHideOnLogin" destination="lc0-VT-DCr" id="Ulf-qv-JHV"/>
+ </connections>
+ </viewController>
+ </objects>
+ <point key="canvasLocation" x="685" y="-224"/>
+ </scene>
+ <!--Recent Posts Table View Controller - Recent Posts-->
+ <scene sceneID="JvB-xN-cSR">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="TWc-kL-1Pi" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ <tableViewController id="tVF-JX-CJF" customClass="RecentPostsTableViewController" sceneMemberID="viewController">
+ <tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="q6K-fZ-zoG">
+ <rect key="frame" x="0.0" y="64" width="320" height="367"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <prototypes>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="PostCell" textLabel="R02-W4-GFh" detailTextLabel="NTt-mg-Sxb" style="IBUITableViewCellStyleSubtitle" id="S8G-gD-BLR">
+ <rect key="frame" x="0.0" y="22" width="320" height="44"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="R02-W4-GFh">
+ <rect key="frame" x="10" y="2" width="38" height="22"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Subtitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NTt-mg-Sxb">
+ <rect key="frame" x="10" y="24" width="47" height="18"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+ </view>
+ </tableViewCell>
+ </prototypes>
+ </tableView>
+ <navigationItem key="navigationItem" title="Recent Posts" id="GfT-Fq-fTQ">
+ <barButtonItem key="rightBarButtonItem" id="Jet-UN-NEV">
+ <button key="customView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="ZD1-8c-wtj">
+ <rect key="frame" x="265" y="5" width="50" height="33"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" title="New">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <segue destination="a81-e7-jTS" kind="push" id="CMb-vs-vla"/>
+ </connections>
+ </button>
+ </barButtonItem>
+ </navigationItem>
+ </tableViewController>
+ </objects>
+ <point key="canvasLocation" x="1224" y="215"/>
+ </scene>
+ <!--New Post View Controller - New Post-->
+ <scene sceneID="hHd-v4-ACg">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="vbi-IP-xB2" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ <viewController storyboardIdentifier="NewPost" id="a81-e7-jTS" customClass="NewPostViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="QM8-No-FZ2">
+ <rect key="frame" x="0.0" y="64" width="320" height="367"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" text="Enter your post here!" id="Uzg-FQ-PGm">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="367"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+ <connections>
+ <outlet property="delegate" destination="a81-e7-jTS" id="OYh-or-bVy"/>
+ </connections>
+ </textView>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ <navigationItem key="navigationItem" title="New Post" id="xXs-HW-ILi">
+ <barButtonItem key="backBarButtonItem" title="Cancel" id="3kf-oY-pCS"/>
+ <barButtonItem key="rightBarButtonItem" id="Tb5-DA-wU1">
+ <button key="customView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="8VB-3v-lJG">
+ <rect key="frame" x="265" y="5" width="50" height="33"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" title="Done">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="doneWithPost:" destination="a81-e7-jTS" eventType="touchDown" id="Xkd-UD-e9H"/>
+ </connections>
+ </button>
+ </barButtonItem>
+ </navigationItem>
+ <connections>
+ <outlet property="postTextView" destination="Uzg-FQ-PGm" id="hc5-cu-iI7"/>
+ </connections>
+ </viewController>
+ </objects>
+ <point key="canvasLocation" x="1667" y="215"/>
+ </scene>
+ <!--Navigation Controller - Recent Posts-->
+ <scene sceneID="1qV-pt-fge">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="AnK-WS-k61" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ <navigationController definesPresentationContext="YES" id="1ge-ty-OPw" sceneMemberID="viewController">
+ <tabBarItem key="tabBarItem" title="Recent Posts" image="second.png" id="DLx-eQ-8go"/>
+ <navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="ifZ-Bb-FAQ">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="tVF-JX-CJF" kind="relationship" relationship="rootViewController" id="fMm-9N-Olq"/>
+ </connections>
+ </navigationController>
+ </objects>
+ <point key="canvasLocation" x="693" y="373"/>
+ </scene>
+ <!--Tab Bar Controller-->
+ <scene sceneID="15">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="14" sceneMemberID="firstResponder"/>
+ <tabBarController id="4" sceneMemberID="viewController">
+ <nil key="simulatedBottomBarMetrics"/>
+ <tabBar key="tabBar" contentMode="scaleToFill" id="5">
+ <rect key="frame" x="0.0" y="431" width="320" height="49"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+ </tabBar>
+ <connections>
+ <segue destination="3" kind="relationship" relationship="viewControllers" id="Lrr-Qm-ILG"/>
+ <segue destination="1ge-ty-OPw" kind="relationship" relationship="viewControllers" id="h07-sg-y4H"/>
+ </connections>
+ </tabBarController>
+ </objects>
+ <point key="canvasLocation" x="132" y="180"/>
+ </scene>
+ </scenes>
+ <resources>
+ <image name="first.png" width="30" height="30"/>
+ <image name="second.png" width="30" height="30"/>
+ </resources>
+ <classes>
+ <class className="NewPostViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/NewPostViewController.h"/>
+ <relationships>
+ <relationship kind="outlet" name="postTextView" candidateClass="UITextView"/>
+ </relationships>
+ </class>
+ <class className="RecentPostsTableViewController" superclassName="UITableViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/RecentPostsTableViewController.h"/>
+ </class>
+ <class className="RegistrationViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/RegistrationViewController.h"/>
+ <relationships>
+ <relationship kind="outlet" name="loginButton" candidateClass="UIButton"/>
+ <relationship kind="outlet" name="passwordField" candidateClass="UITextField"/>
+ <relationship kind="outlet" name="registrationView" candidateClass="UIView"/>
+ <relationship kind="outlet" name="signUpButton" candidateClass="UIButton"/>
+ <relationship kind="outlet" name="usernameField" candidateClass="UITextField"/>
+ <relationship kind="outlet" name="viewTitle" candidateClass="UILabel"/>
+ <relationship kind="outletCollection" name="itemsToHideOnLogin" candidateClass="UIView"/>
+ </relationships>
+ </class>
+ </classes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination"/>
+ </simulatedMetricsContainer>
+</document>
14 ParsePosts/NewPostViewController.h
View
@@ -0,0 +1,14 @@
+//
+// NewPostViewController.h
+// ParseTest
+//
+// Created by David Rodriguez on 4/11/12.
+// Copyright (c) 2012 Forge42. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface NewPostViewController : UIViewController <UITextViewDelegate>
+@property (retain, nonatomic) IBOutlet UITextView *postTextView;
+
+@end
93 ParsePosts/NewPostViewController.m
View
@@ -0,0 +1,93 @@
+//
+// NewPostViewController.m
+// ParseTest
+//
+// Created by David Rodriguez on 4/11/12.
+// Copyright (c) 2012 Forge42. All rights reserved.
+//
+
+#import "NewPostViewController.h"
+
+@interface NewPostViewController ()
+
+@end
+
+@implementation NewPostViewController
+@synthesize postTextView;
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ // Custom initialization
+ }
+ return self;
+}
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view.
+}
+
+- (void)viewDidUnload
+{
+ [self setPostTextView:nil];
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+
+- (void)dealloc {
+ [postTextView release];
+ [super dealloc];
+}
+
+#pragma mark -
+#pragma mark Button Actions
+
+- (IBAction)doneWithPost:(id)sender {
+
+ //remove the keyboard
+ [postTextView resignFirstResponder];
+
+ // show an alert message if text field empty or it's the default text
+ if( [postTextView.text isEqualToString:@"Enter your post here!"] ||
+ [[postTextView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length] == 0 ) {
+
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"New Post" message:@"Please type something in." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
+ [alert show];
+
+ } else {
+
+ //Parse: save the new post here
+
+
+ // dismiss the controller
+ [self.navigationController popViewControllerAnimated:YES];
+ }
+
+}
+
+#pragma mark -
+#pragma mark UITextViewDelegate Methods
+
+- (void)textViewDidBeginEditing:(UITextView *)textView {
+ if( [textView.text isEqualToString:@"Enter your post here!"] ) {
+ textView.text = @"";
+ }
+}
+
+- (void)textViewDidEndEditing:(UITextView *)textView {
+ // if string is empty or just whitespace characters
+ if( [[textView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length] == 0 ) {
+ textView.text = @"Enter your post here!";
+ }
+}
+
+
+@end
4 ParsePosts/ParsePosts-Info.plist
View
@@ -24,6 +24,8 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
+ <key>UIMainStoryboardFile</key>
+ <string>MainStoryboard_iPhone</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
@@ -31,8 +33,6 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
18 ParsePosts/RecentPostsTableViewController.h
View
@@ -0,0 +1,18 @@
+//
+// RecentPostsTableViewController.h
+// ParseTest
+//
+// Created by David Rodriguez on 4/11/12.
+// Copyright (c) 2012 Forge42. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface RecentPostsTableViewController : UITableViewController
+{
+ NSArray *posts;
+}
+
+@property(retain, nonatomic) NSArray *posts;
+
+@end
76 ParsePosts/RecentPostsTableViewController.m
View
@@ -0,0 +1,76 @@
+//
+// RecentPostsTableViewController.m
+// ParseTest
+//
+// Created by David Rodriguez on 4/11/12.
+// Copyright (c) 2012 Forge42. All rights reserved.
+//
+
+#import "RecentPostsTableViewController.h"
+
+@interface RecentPostsTableViewController ()
+
+@end
+
+@implementation RecentPostsTableViewController
+@synthesize posts;
+
+- (id)initWithStyle:(UITableViewStyle)style
+{
+ self = [super initWithStyle:style];
+ if (self) {
+ // Custom initialization
+ [self setPosts:[NSArray array]]; // setup the empty posts array
+ }
+ return self;
+}
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+
+ // Uncomment the following line to preserve selection between presentations.
+ // self.clearsSelectionOnViewWillAppear = NO;
+
+ // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
+ // self.navigationItem.rightBarButtonItem = self.editButtonItem;
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+
+- (void)dealloc {
+
+ [self setPosts:nil];
+
+ [super dealloc];
+}
+
+#pragma mark - Table view data source
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+ // Return the number of rows in the section.
+ return [posts count];
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ static NSString *CellIdentifier = @"PostCell";
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+
+ // Configure the cell...
+
+ return cell;
+}
+
+@end
22 ParsePosts/RegistrationViewController.h
View
@@ -0,0 +1,22 @@
+//
+// SecondViewController.h
+// ParseTest
+//
+// Created by David Rodriguez on 4/11/12.
+// Copyright (c) 2012 Forge42. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface RegistrationViewController : UIViewController
+
+@property (retain, nonatomic) IBOutlet UITextField *usernameField;
+@property (retain, nonatomic) IBOutlet UITextField *passwordField;
+@property (retain, nonatomic) IBOutlet UIView *registrationView;
+@property (retain, nonatomic) IBOutlet UIButton *signUpButton;
+@property (retain, nonatomic) IBOutlet UIButton *loginButton;
+@property (retain, nonatomic) IBOutlet UILabel *viewTitle;
+
+@property (retain, nonatomic) IBOutletCollection(UIView) NSArray *itemsToHideOnLogin;
+
+@end
124 ParsePosts/RegistrationViewController.m
View
@@ -0,0 +1,124 @@
+//
+// SecondViewController.m
+// ParseTest
+//
+// Created by David Rodriguez on 4/11/12.
+// Copyright (c) 2012 Forge42. All rights reserved.
+//
+
+#import "RegistrationViewController.h"
+
+@interface RegistrationViewController ()
+
+@end
+
+@implementation RegistrationViewController
+@synthesize usernameField;
+@synthesize passwordField;
+@synthesize registrationView;
+@synthesize signUpButton;
+@synthesize loginButton;
+@synthesize viewTitle;
+@synthesize itemsToHideOnLogin;
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+
+ if( false ) { // check if user is logged in here
+ [self loginSuccessful];
+ }
+}
+
+- (void)viewDidUnload
+{
+ [self setUsernameField:nil];
+ [self setPasswordField:nil];
+ [self setRegistrationView:nil];
+ [self setSignUpButton:nil];
+ [self setLoginButton:nil];
+ [self setViewTitle:nil];
+ [self setItemsToHideOnLogin:nil];
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
+ return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+ } else {
+ return YES;
+ }
+}
+
+- (void)dealloc {
+ [usernameField release];
+ [passwordField release];
+ [registrationView release];
+ [signUpButton release];
+ [loginButton release];
+ [viewTitle release];
+ [itemsToHideOnLogin release];
+ [super dealloc];
+}
+
+#pragma mark -
+#pragma mark Login/Logout Actions
+
+- (void)loginSuccessful {
+ [loginButton setTitle:@"Logout" forState:UIControlStateNormal];
+
+ for( UIView *item in itemsToHideOnLogin ) {
+ [item setHidden:YES];
+ }
+
+ viewTitle.text = [NSString stringWithFormat:@"Welcome %@!", @"Username"]; //Parse: set the user's username here
+
+}
+
+- (void)logoutSuccessful {
+ [loginButton setTitle:@"Login" forState:UIControlStateNormal];
+
+ for( UIView *item in itemsToHideOnLogin ) {
+ [item setHidden:NO];
+ }
+
+ viewTitle.text = [NSString stringWithFormat:@"Please Login or Sign Up Below"];
+}
+
+- (IBAction)login:(id)sender {
+
+ if( false ) { // check if user is logged in here
+ [self logoutSuccessful];
+ } else {
+
+ //Parse: login code goes here
+
+ [self resignKeyboard];
+ [self loginSuccessful];
+ }
+}
+
+- (IBAction)signUp:(id)sender {
+
+ //Parse: sign up code goes here
+
+ [self resignKeyboard];
+ [self loginSuccessful];
+}
+
+#pragma mark -
+#pragma mark Keyboard Actions
+
+- (IBAction)resignKeyboard {
+ [usernameField resignFirstResponder];
+ [passwordField resignFirstResponder];
+}
+
+- (IBAction)endedEditing:(id)sender {
+ [self resignFirstResponder];
+}
+
+@end
BIN  ParsePosts/first.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/first@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/iTunesArtwork
View
Binary file not shown
BIN  ParsePosts/second.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  ParsePosts/second@2x.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.