Skip to content

Commit

Permalink
I guess Mona just found!
Browse files Browse the repository at this point in the history
  • Loading branch information
surganov committed Jul 29, 2013
1 parent bb898b9 commit aa43758
Show file tree
Hide file tree
Showing 10 changed files with 157 additions and 40 deletions.
Binary file added 03 Colored Circles/color-circles-icon.indd
Binary file not shown.
Binary file added 04 De Stijl/de-stijl-icon.indd
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@
E69C902C17A7072700C3E23D /* mona-landscape-right.png in Resources */ = {isa = PBXBuildFile; fileRef = E69C902817A7072700C3E23D /* mona-landscape-right.png */; };
E69C902D17A7072700C3E23D /* mona-portrait-upside-down.png in Resources */ = {isa = PBXBuildFile; fileRef = E69C902917A7072700C3E23D /* mona-portrait-upside-down.png */; };
E69C902E17A7072700C3E23D /* mona-portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = E69C902A17A7072700C3E23D /* mona-portrait.png */; };
E6E1251417A7180300C5CB73 /* where's-mona-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = E6E1251317A7180300C5CB73 /* where's-mona-icon.png */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
E69C8FFE17A7062800C3E23D /* Where's Mona?.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Where's Mona?.app"; sourceTree = BUILT_PRODUCTS_DIR; };
E69C8FFE17A7062800C3E23D /* Where's Mona.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Where's Mona.app"; sourceTree = BUILT_PRODUCTS_DIR; };
E69C900117A7062800C3E23D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
E69C900317A7062800C3E23D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
E69C900517A7062800C3E23D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
E69C900917A7062800C3E23D /* Where's Mona?-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Where's Mona?-Info.plist"; sourceTree = "<group>"; };
E69C900917A7062800C3E23D /* Where's Mona-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Where's Mona-Info.plist"; sourceTree = "<group>"; };
E69C900B17A7062800C3E23D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
E69C900D17A7062800C3E23D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
E69C900F17A7062800C3E23D /* Where's Mona?-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Where's Mona?-Prefix.pch"; sourceTree = "<group>"; };
E69C900F17A7062800C3E23D /* Where's Mona-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Where's Mona-Prefix.pch"; sourceTree = "<group>"; };
E69C901017A7062800C3E23D /* MonaAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MonaAppDelegate.h; sourceTree = "<group>"; };
E69C901117A7062800C3E23D /* MonaAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonaAppDelegate.m; sourceTree = "<group>"; };
E69C901317A7062800C3E23D /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
Expand All @@ -45,6 +46,7 @@
E69C902817A7072700C3E23D /* mona-landscape-right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mona-landscape-right.png"; sourceTree = "<group>"; };
E69C902917A7072700C3E23D /* mona-portrait-upside-down.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mona-portrait-upside-down.png"; sourceTree = "<group>"; };
E69C902A17A7072700C3E23D /* mona-portrait.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "mona-portrait.png"; sourceTree = "<group>"; };
E6E1251317A7180300C5CB73 /* where's-mona-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "where's-mona-icon.png"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -64,6 +66,7 @@
E69C8FF517A7062800C3E23D = {
isa = PBXGroup;
children = (
E6E1251317A7180300C5CB73 /* where's-mona-icon.png */,
E69C900717A7062800C3E23D /* Where's Mona? */,
E69C900017A7062800C3E23D /* Frameworks */,
E69C8FFF17A7062800C3E23D /* Products */,
Expand All @@ -73,7 +76,7 @@
E69C8FFF17A7062800C3E23D /* Products */ = {
isa = PBXGroup;
children = (
E69C8FFE17A7062800C3E23D /* Where's Mona?.app */,
E69C8FFE17A7062800C3E23D /* Where's Mona.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -105,10 +108,10 @@
E69C900817A7062800C3E23D /* Supporting Files */ = {
isa = PBXGroup;
children = (
E69C900917A7062800C3E23D /* Where's Mona?-Info.plist */,
E69C900917A7062800C3E23D /* Where's Mona-Info.plist */,
E69C900A17A7062800C3E23D /* InfoPlist.strings */,
E69C900D17A7062800C3E23D /* main.m */,
E69C900F17A7062800C3E23D /* Where's Mona?-Prefix.pch */,
E69C900F17A7062800C3E23D /* Where's Mona-Prefix.pch */,
E69C901317A7062800C3E23D /* Default.png */,
E69C901517A7062800C3E23D /* Default@2x.png */,
E69C901717A7062800C3E23D /* Default-568h@2x.png */,
Expand All @@ -130,9 +133,9 @@
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
E69C8FFD17A7062800C3E23D /* Where's Mona? */ = {
E69C8FFD17A7062800C3E23D /* Where's Mona */ = {
isa = PBXNativeTarget;
buildConfigurationList = E69C902117A7062800C3E23D /* Build configuration list for PBXNativeTarget "Where's Mona?" */;
buildConfigurationList = E69C902117A7062800C3E23D /* Build configuration list for PBXNativeTarget "Where's Mona" */;
buildPhases = (
E69C8FFA17A7062800C3E23D /* Sources */,
E69C8FFB17A7062800C3E23D /* Frameworks */,
Expand All @@ -142,9 +145,9 @@
);
dependencies = (
);
name = "Where's Mona?";
name = "Where's Mona";
productName = "Where's Mona?";
productReference = E69C8FFE17A7062800C3E23D /* Where's Mona?.app */;
productReference = E69C8FFE17A7062800C3E23D /* Where's Mona.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
Expand All @@ -157,7 +160,7 @@
LastUpgradeCheck = 0460;
ORGANIZATIONNAME = "Sergey Surganov";
};
buildConfigurationList = E69C8FF917A7062800C3E23D /* Build configuration list for PBXProject "Where's Mona?" */;
buildConfigurationList = E69C8FF917A7062800C3E23D /* Build configuration list for PBXProject "Where's Mona" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
Expand All @@ -169,7 +172,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
E69C8FFD17A7062800C3E23D /* Where's Mona? */,
E69C8FFD17A7062800C3E23D /* Where's Mona */,
);
};
/* End PBXProject section */
Expand All @@ -188,6 +191,7 @@
E69C902C17A7072700C3E23D /* mona-landscape-right.png in Resources */,
E69C902D17A7072700C3E23D /* mona-portrait-upside-down.png in Resources */,
E69C902E17A7072700C3E23D /* mona-portrait.png in Resources */,
E6E1251417A7180300C5CB73 /* where's-mona-icon.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -286,9 +290,9 @@
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Where's Mona?/Where's Mona?-Prefix.pch";
INFOPLIST_FILE = "Where's Mona?/Where's Mona?-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
GCC_PREFIX_HEADER = "Where's Mona?/Where's Mona-Prefix.pch";
INFOPLIST_FILE = "Where's Mona?/Where's Mona-Info.plist";
PRODUCT_NAME = "Where's Mona";
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand All @@ -297,17 +301,17 @@
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Where's Mona?/Where's Mona?-Prefix.pch";
INFOPLIST_FILE = "Where's Mona?/Where's Mona?-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
GCC_PREFIX_HEADER = "Where's Mona?/Where's Mona-Prefix.pch";
INFOPLIST_FILE = "Where's Mona?/Where's Mona-Info.plist";
PRODUCT_NAME = "Where's Mona";
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
E69C8FF917A7062800C3E23D /* Build configuration list for PBXProject "Where's Mona?" */ = {
E69C8FF917A7062800C3E23D /* Build configuration list for PBXProject "Where's Mona" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E69C901F17A7062800C3E23D /* Debug */,
Expand All @@ -316,13 +320,14 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E69C902117A7062800C3E23D /* Build configuration list for PBXNativeTarget "Where's Mona?" */ = {
E69C902117A7062800C3E23D /* Build configuration list for PBXNativeTarget "Where's Mona" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E69C902217A7062800C3E23D /* Debug */,
E69C902317A7062800C3E23D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
2 changes: 2 additions & 0 deletions 05 Where's Mona?/Where's Mona?/MonaViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@

@interface MonaViewController : UIViewController

@property (weak, nonatomic) IBOutlet UIImageView *imageHolder;

@end
52 changes: 51 additions & 1 deletion 05 Where's Mona?/Where's Mona?/MonaViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,30 @@ @interface MonaViewController ()

@implementation MonaViewController

- (void)viewDidAppear:(BOOL)animated
{
// UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation];
// animated = NO;
// UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
// if (orientation == UIDeviceOrientationLandscapeLeft) {
// NSLog(@"left");
// }
}


- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
[UIView setAnimationsEnabled:NO];
}


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
[UIView setAnimationsEnabled:NO];
/* Your original orientation booleans*/

return TRUE;
}


- (void)viewDidLoad
{
[super viewDidLoad];
Expand All @@ -22,7 +46,33 @@ - (void)viewDidLoad

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
NSLog(@"It's rotates!");
duration = 5.0;
switch (toInterfaceOrientation) {
case UIInterfaceOrientationPortrait:
self.imageHolder.image = [UIImage imageNamed:@"mona-portrait.png"];
NSLog(@"portrait");
break;
case UIInterfaceOrientationLandscapeLeft:
self.imageHolder.image = [UIImage imageNamed:@"mona-landscape-right.png"];
NSLog(@"left");
break;
case UIInterfaceOrientationLandscapeRight:
self.imageHolder.image = [UIImage imageNamed:@"mona-landscape-left.png"];
NSLog(@"right");
break;
case UIInterfaceOrientationPortraitUpsideDown:
self.imageHolder.image = [UIImage imageNamed:@"mona-portrait-upside-down.png"];
NSLog(@"upside down");
break;

default:
break;
}
}

- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>where's-mona-icon.png</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.company.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -26,10 +38,14 @@
<true/>
<key>UIMainStoryboardFile</key>
<string>MainStoryboard</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
30 changes: 30 additions & 0 deletions 05 Where's Mona?/Where's Mona?/Where's Mona-Prefix.pch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// Prefix header for all source files of the 'Where's Mona?' target in the 'Where's Mona?' project
//

#import <Availability.h>

#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif

#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

#ifndef NDEBUG
#import <Foundation/Foundation.h>
#import <stdio.h>

extern void _NSSetLogCStringFunction(void (*)(const char *string, unsigned length, BOOL withSyslogBanner));

static void PrintNSLogMessage(const char *string, unsigned length, BOOL withSyslogBanner){
puts(string);
}

static void HackNSLog(void) __attribute__((constructor));
static void HackNSLog(void){
_NSSetLogCStringFunction(PrintNSLogMessage);
}
#endif
14 changes: 0 additions & 14 deletions 05 Where's Mona?/Where's Mona?/Where's Mona?-Prefix.pch

This file was deleted.

38 changes: 33 additions & 5 deletions 05 Where's Mona?/Where's Mona?/en.lproj/MainStoryboard.storyboard
Original file line number Diff line number Diff line change
@@ -1,26 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2519" systemVersion="12A206j" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="2">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="2">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1856"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
<scenes>
<!--class Prefix:identifier View Controller-->
<!--Mona View Controller-->
<scene sceneID="5">
<objects>
<viewController id="2" customClass="MonaViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="3">
<rect key="frame" x="0.0" y="20" width="320" height="460"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" image="mona-portrait.png" translatesAutoresizingMaskIntoConstraints="NO" id="o69-gP-amu"/>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="o69-gP-amu" firstAttribute="leading" secondItem="3" secondAttribute="leading" type="default" id="1Qq-Bk-UQS"/>
<constraint firstItem="o69-gP-amu" firstAttribute="trailing" secondItem="3" secondAttribute="trailing" type="default" id="Qm8-aK-LYw"/>
<constraint firstItem="o69-gP-amu" firstAttribute="bottom" secondItem="3" secondAttribute="bottom" type="default" id="hVd-Ga-Yyj"/>
<constraint firstItem="o69-gP-amu" firstAttribute="top" secondItem="3" secondAttribute="top" type="default" id="ixE-S0-YXF"/>
</constraints>
</view>
<nil key="simulatedStatusBarMetrics"/>
<connections>
<outlet property="imageHolder" destination="o69-gP-amu" id="jjk-T2-Tda"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="205" y="114"/>
</scene>
</scenes>
<resources>
<image name="mona-portrait.png" width="640" height="1136"/>
</resources>
<classes>
<class className="MonaViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/MonaViewController.h"/>
<relationships>
<relationship kind="outlet" name="imageHolder" candidateClass="UIImageView"/>
</relationships>
</class>
<class className="NSLayoutConstraint" superclassName="NSObject">
<source key="sourceIdentifier" type="project" relativePath="./Classes/NSLayoutConstraint.h"/>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
</document>
Binary file added 05 Where's Mona?/where's-mona-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit aa43758

Please sign in to comment.