Permalink
Browse files

resources, rotateing view

  • Loading branch information...
takuma104 committed Apr 6, 2010
1 parent 0ff478f commit 6318cfeddb816915e4eb40942f73c2a07fd7c378
View
@@ -5,13 +5,13 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
- <string>${PRODUCT_NAME}</string>
+ <string>nTouches</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
- <string></string>
+ <string>icon72x72.png</string>
<key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
+ <string>com.lazuro.ntocuhes</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@@ -30,6 +30,8 @@
<string>MainWindow_Phone</string>
<key>NSMainNibFile~ipad</key>
<string>MainWindow_Pad</string>
+ <key>UIPrerenderedIcon</key>
+ <true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
@@ -16,7 +16,11 @@
2860E32F111B888700E27156 /* MainWindow_Pad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2860E32D111B888700E27156 /* MainWindow_Pad.xib */; };
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
F110DA4A116B7A01004C5C30 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F110DA49116B7A01004C5C30 /* MainViewController.m */; };
- F110DAD6116B8392004C5C30 /* touch.png in Resources */ = {isa = PBXBuildFile; fileRef = F110DAD5116B8392004C5C30 /* touch.png */; };
+ F19016FD116BB3A6002ED641 /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = F19016F8116BB3A6002ED641 /* Default-Landscape.png */; };
+ F19016FE116BB3A6002ED641 /* Default-Portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = F19016F9116BB3A6002ED641 /* Default-Portrait.png */; };
+ F19016FF116BB3A6002ED641 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = F19016FA116BB3A6002ED641 /* Default.png */; };
+ F1901700116BB3A6002ED641 /* icon72x72.png in Resources */ = {isa = PBXBuildFile; fileRef = F19016FB116BB3A6002ED641 /* icon72x72.png */; };
+ F1901701116BB3A6002ED641 /* touch.png in Resources */ = {isa = PBXBuildFile; fileRef = F19016FC116BB3A6002ED641 /* touch.png */; };
F1AF123E116B85CB0041D976 /* UIView+FadeInOut.m in Sources */ = {isa = PBXBuildFile; fileRef = F1AF123D116B85CB0041D976 /* UIView+FadeInOut.m */; };
/* End PBXBuildFile section */
@@ -36,7 +40,11 @@
8D1107310486CEB800E47090 /* NTouches-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "NTouches-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
F110DA48116B7A01004C5C30 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Shared/MainViewController.h; sourceTree = "<group>"; };
F110DA49116B7A01004C5C30 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Shared/MainViewController.m; sourceTree = "<group>"; };
- F110DAD5116B8392004C5C30 /* touch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = touch.png; sourceTree = "<group>"; };
+ F19016F8116BB3A6002ED641 /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape.png"; sourceTree = "<group>"; };
+ F19016F9116BB3A6002ED641 /* Default-Portrait.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait.png"; sourceTree = "<group>"; };
+ F19016FA116BB3A6002ED641 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+ F19016FB116BB3A6002ED641 /* icon72x72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon72x72.png; sourceTree = "<group>"; };
+ F19016FC116BB3A6002ED641 /* touch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = touch.png; sourceTree = "<group>"; };
F1AF123C116B85CB0041D976 /* UIView+FadeInOut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIView+FadeInOut.h"; path = "Shared/UIView+FadeInOut.h"; sourceTree = "<group>"; };
F1AF123D116B85CB0041D976 /* UIView+FadeInOut.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIView+FadeInOut.m"; path = "Shared/UIView+FadeInOut.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -86,7 +94,6 @@
28EEBF621118D79A00187D67 /* Shared */ = {
isa = PBXGroup;
children = (
- F110DAD4116B8392004C5C30 /* resources */,
8D1107310486CEB800E47090 /* NTouches-Info.plist */,
F110DA48116B7A01004C5C30 /* MainViewController.h */,
F110DA49116B7A01004C5C30 /* MainViewController.m */,
@@ -103,6 +110,7 @@
2860E324111B887F00E27156 /* iPhone */,
28EEBF621118D79A00187D67 /* Shared */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
+ F19016F7116BB3A6002ED641 /* resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
@@ -128,13 +136,16 @@
name = Frameworks;
sourceTree = "<group>";
};
- F110DAD4116B8392004C5C30 /* resources */ = {
+ F19016F7116BB3A6002ED641 /* resources */ = {
isa = PBXGroup;
children = (
- F110DAD5116B8392004C5C30 /* touch.png */,
+ F19016F8116BB3A6002ED641 /* Default-Landscape.png */,
+ F19016F9116BB3A6002ED641 /* Default-Portrait.png */,
+ F19016FA116BB3A6002ED641 /* Default.png */,
+ F19016FB116BB3A6002ED641 /* icon72x72.png */,
+ F19016FC116BB3A6002ED641 /* touch.png */,
);
- name = resources;
- path = Shared/resources;
+ path = resources;
sourceTree = "<group>";
};
/* End PBXGroup section */
@@ -181,7 +192,11 @@
files = (
2860E329111B887F00E27156 /* MainWindow_Phone.xib in Resources */,
2860E32F111B888700E27156 /* MainWindow_Pad.xib in Resources */,
- F110DAD6116B8392004C5C30 /* touch.png in Resources */,
+ F19016FD116BB3A6002ED641 /* Default-Landscape.png in Resources */,
+ F19016FE116BB3A6002ED641 /* Default-Portrait.png in Resources */,
+ F19016FF116BB3A6002ED641 /* Default.png in Resources */,
+ F1901700116BB3A6002ED641 /* icon72x72.png in Resources */,
+ F1901701116BB3A6002ED641 /* touch.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
@@ -1,7 +1,3 @@
-//
-// Prefix header for all source files of the 'NTouches' target in the 'NTouches' project
-//
-
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@@ -3,7 +3,6 @@
@implementation MainViewController
-
- (void)updateTouchCount {
countLabel.text = [NSString stringWithFormat:@"%02d", [activeTouches count]];
}
@@ -21,7 +20,7 @@ - (void)viewDidLoad {
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- return UIInterfaceOrientationIsPortrait(interfaceOrientation);
+ return YES;
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
@@ -35,7 +34,7 @@ - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UIView *v = [self createTouchViewAt:[t locationInView:self.view]];
v.tag = [t hash];
[self.view addSubview:v];
- [v fadeIn];
+ [v fadeInWithDuration:[NSNumber numberWithFloat:0.3f]];
}
}
@@ -61,7 +60,8 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
for (UITouch *t in touches) {
- [[self viewForTouch:t] fadeOut];
+// [[self viewForTouch:t] fadeOut];
+ [[self viewForTouch:t] removeFromSuperview];
[activeTouches removeObject:t];
}
@@ -2,7 +2,7 @@
@interface UIView(FadeInOut)
-- (void)fadeIn;
-- (void)fadeOut;
+- (void)fadeInWithDuration:(NSNumber*)duration;
+- (void)fadeOutWithDuration:(NSNumber*)duration;
@end
View
@@ -2,28 +2,24 @@
@implementation UIView(FadeInOut)
-- (void)fadeIn {
+- (void)fadeInWithDuration:(NSNumber*)duration {
self.alpha = 0.f;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
- [UIView setAnimationDuration:0.3f];
+ [UIView setAnimationDuration:[duration floatValue]];
self.alpha = 1.f;
[UIView commitAnimations];
}
-- (void)fadeOut {
-/* [UIView beginAnimations:nil context:NULL];
- [UIView setAnimationDuration:0.3f];
+- (void)fadeOutWithDuration:(NSNumber*)duration {
+ float d = [duration floatValue];
+ self.alpha = 1.f;
+ [UIView beginAnimations:nil context:NULL];
+ [UIView setAnimationDuration:d];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
-// [UIView setAnimationDelegate:self];
-// [UIView setAnimationDidStopSelector:@selector(removeFromSuperview)];
- self.alpha = 0.f;
+ self.alpha = 0.f;
[UIView commitAnimations];
- [self performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.4f];
-*/
-
- [self removeFromSuperview];
-// [self performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.4f];
+ [self performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:d + 0.1f];
}
@end
View
@@ -1,15 +1,6 @@
-//
-// main.m
-// NTouches
-//
-// Created by Takuma Mori on 10/04/06.
-// Copyright __MyCompanyName__ 2010. All rights reserved.
-//
-
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
-
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
View
@@ -6,7 +6,7 @@ @implementation AppDelegate_Pad
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[window addSubview:mainViewController.view];
- [window makeKeyAndVisible];
+ [window makeKeyAndVisible];
return YES;
}
View
@@ -37,6 +37,9 @@
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
+ <object class="IBUICustomObject" id="250404236">
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ </object>
<object class="IBUIWindow" id="62075450">
<nil key="NSNextResponder"/>
<int key="NSvFlags">292</int>
@@ -53,8 +56,27 @@
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIResizesToFullScreen">YES</bool>
</object>
- <object class="IBUICustomObject" id="250404236">
+ <object class="IBUIImageView" id="987634314">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{768, 1024}</string>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">Default-Portrait.png</string>
+ </object>
+ </object>
+ <object class="IBUIImageView" id="1059595214">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{1024, 768}</string>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">Default-Landscape.png</string>
+ </object>
</object>
<object class="IBUIViewController" id="803379989">
<object class="IBUIView" key="IBUIView" id="616927617">
@@ -64,8 +86,8 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUILabel" id="866555573">
<reference key="NSNextResponder" ref="616927617"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{557, 20}, {191, 133}}</string>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{575, 20}, {173, 124}}</string>
<reference key="NSSuperview" ref="616927617"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@@ -96,8 +118,8 @@
</object>
<object class="IBUILabel" id="827910892">
<reference key="NSNextResponder" ref="616927617"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{492, 150}, {320, 21}}</string>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{611, 142}, {101, 29}}</string>
<reference key="NSSuperview" ref="616927617"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -107,7 +129,7 @@
<string key="IBUIText">touch(es)</string>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
- <double key="NSSize">13</double>
+ <double key="NSSize">18</double>
<int key="NSfFlags">16</int>
</object>
<object class="NSColor" key="IBUITextColor">
@@ -121,17 +143,14 @@
<int key="IBUITextAlignment">1</int>
</object>
</object>
- <string key="NSFrame">{{0, -10}, {768, 1024}}</string>
+ <string key="NSFrameSize">{768, 1024}</string>
<reference key="NSSuperview"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC4xODYxMzEzODY5AA</bytes>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
- <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
- <int key="IBUIStatusBarStyle">2</int>
- </object>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="interfaceOrientation">1</int>
</object>
@@ -237,6 +256,16 @@
<reference key="object" ref="866555573"/>
<reference key="parent" ref="616927617"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">16</int>
+ <reference key="object" ref="1059595214"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">17</int>
+ <reference key="object" ref="987634314"/>
+ <reference key="parent" ref="0"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -251,6 +280,10 @@
<string>11.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
<string>13.IBPluginDependency</string>
+ <string>16.IBEditorWindowLastContentRect</string>
+ <string>16.IBPluginDependency</string>
+ <string>17.IBEditorWindowLastContentRect</string>
+ <string>17.IBPluginDependency</string>
<string>2.IBEditorWindowLastContentRect</string>
<string>2.IBPluginDependency</string>
<string>6.CustomClassName</string>
@@ -261,10 +294,14 @@
<string>UIApplication</string>
<string>UIResponder</string>
<string>MainViewController</string>
- <string>{{62, 45}, {783, 711}}</string>
+ <string>{{386, 67}, {597, 618}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{21, 45}, {1039, 711}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{42, 45}, {783, 711}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>{{903, 55}, {768, 1024}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -288,7 +325,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">15</int>
+ <int key="maxID">24</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -471,6 +508,14 @@
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIImageView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIImageView.h</string>
+ </object>
+ </object>
<object class="IBPartialClassDescription">
<string key="className">UILabel</string>
<string key="superclassName">UIView</string>
@@ -574,6 +619,19 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">../NTouches.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>Default-Landscape.png</string>
+ <string>Default-Portrait.png</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>{1024, 768}</string>
+ <string>{768, 1024}</string>
+ </object>
+ </object>
<string key="IBCocoaTouchPluginVersion">87</string>
</data>
</archive>
Oops, something went wrong.

0 comments on commit 6318cfe

Please sign in to comment.