OSDN Git Service

Add icon to list view
authorHirami <tomohisa.hirami@nifty.com>
Wed, 28 Mar 2012 10:55:10 +0000 (19:55 +0900)
committerHirami <tomohisa.hirami@nifty.com>
Wed, 28 Mar 2012 10:55:10 +0000 (19:55 +0900)
iOS/Tombo/COPYRIGHT.txt [new file with mode: 0644]
iOS/Tombo/Tombo.xcodeproj/project.pbxproj
iOS/Tombo/Tombo/Folder-32.png [new file with mode: 0644]
iOS/Tombo/Tombo/Folder-48.png [new file with mode: 0644]
iOS/Tombo/Tombo/MasterViewController.m
iOS/Tombo/Tombo/TextDocument-32.png [new file with mode: 0644]
iOS/Tombo/Tombo/TextDocument-48.png [new file with mode: 0644]

diff --git a/iOS/Tombo/COPYRIGHT.txt b/iOS/Tombo/COPYRIGHT.txt
new file mode 100644 (file)
index 0000000..ad2cd37
--- /dev/null
@@ -0,0 +1,13 @@
+Source code: 
+       Copyright (C) 2012 Tomohisa Hirami, All rights reserved.
+
+====
+Icons:
+       By Photoshopedia
+               http://www.photoshopedia.com/
+               http://www.iconspedia.com/pack/xedia-2164/
+
+License:  The icons are free to use for both personal and commercial projects. You are not allowed to sell these brushes. You can share or redistribute these brushes, but a link back to Photoshopedia is required.
+
+All rights reserved Photoshopedia - http://www.photoshopedia.com/373
+====
index f88166f..7167c05 100644 (file)
                92DE33861522998700AD06EC /* Storage.m in Sources */ = {isa = PBXBuildFile; fileRef = 92DE33851522998700AD06EC /* Storage.m */; };
                92DE338D1522F61200AD06EC /* CustomSegue.m in Sources */ = {isa = PBXBuildFile; fileRef = 92DE338C1522F61200AD06EC /* CustomSegue.m */; };
                92DE33901522FFEC00AD06EC /* FileItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 92DE338F1522FFEB00AD06EC /* FileItem.m */; };
+               92DE339F15231CFC00AD06EC /* Folder-32.png in Resources */ = {isa = PBXBuildFile; fileRef = 92DE339B15231CFC00AD06EC /* Folder-32.png */; };
+               92DE33A015231CFC00AD06EC /* Folder-48.png in Resources */ = {isa = PBXBuildFile; fileRef = 92DE339C15231CFC00AD06EC /* Folder-48.png */; };
+               92DE33A115231CFC00AD06EC /* TextDocument-32.png in Resources */ = {isa = PBXBuildFile; fileRef = 92DE339D15231CFC00AD06EC /* TextDocument-32.png */; };
+               92DE33A215231CFC00AD06EC /* TextDocument-48.png in Resources */ = {isa = PBXBuildFile; fileRef = 92DE339E15231CFC00AD06EC /* TextDocument-48.png */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
                92DE338C1522F61200AD06EC /* CustomSegue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomSegue.m; sourceTree = "<group>"; };
                92DE338E1522FFEB00AD06EC /* FileItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileItem.h; sourceTree = "<group>"; };
                92DE338F1522FFEB00AD06EC /* FileItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileItem.m; sourceTree = "<group>"; };
+               92DE339B15231CFC00AD06EC /* Folder-32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Folder-32.png"; sourceTree = "<group>"; };
+               92DE339C15231CFC00AD06EC /* Folder-48.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Folder-48.png"; sourceTree = "<group>"; };
+               92DE339D15231CFC00AD06EC /* TextDocument-32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "TextDocument-32.png"; sourceTree = "<group>"; };
+               92DE339E15231CFC00AD06EC /* TextDocument-48.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "TextDocument-48.png"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
                92DE3332151E277D00AD06EC /* Tombo */ = {
                        isa = PBXGroup;
                        children = (
+                               92DE339915231CD100AD06EC /* images */,
                                92DE333B151E277D00AD06EC /* AppDelegate.h */,
                                92DE333C151E277D00AD06EC /* AppDelegate.m */,
                                92DE333E151E277D00AD06EC /* MainStoryboard_iPhone.storyboard */,
                        name = "Supporting Files";
                        sourceTree = "<group>";
                };
+               92DE339915231CD100AD06EC /* images */ = {
+                       isa = PBXGroup;
+                       children = (
+                               92DE339B15231CFC00AD06EC /* Folder-32.png */,
+                               92DE339C15231CFC00AD06EC /* Folder-48.png */,
+                               92DE339D15231CFC00AD06EC /* TextDocument-32.png */,
+                               92DE339E15231CFC00AD06EC /* TextDocument-48.png */,
+                       );
+                       name = images;
+                       sourceTree = "<group>";
+               };
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
                                92DE3337151E277D00AD06EC /* InfoPlist.strings in Resources */,
                                92DE3340151E277D00AD06EC /* MainStoryboard_iPhone.storyboard in Resources */,
                                92DE3343151E277D00AD06EC /* MainStoryboard_iPad.storyboard in Resources */,
+                               92DE339F15231CFC00AD06EC /* Folder-32.png in Resources */,
+                               92DE33A015231CFC00AD06EC /* Folder-48.png in Resources */,
+                               92DE33A115231CFC00AD06EC /* TextDocument-32.png in Resources */,
+                               92DE33A215231CFC00AD06EC /* TextDocument-48.png in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/iOS/Tombo/Tombo/Folder-32.png b/iOS/Tombo/Tombo/Folder-32.png
new file mode 100644 (file)
index 0000000..1b256d4
Binary files /dev/null and b/iOS/Tombo/Tombo/Folder-32.png differ
diff --git a/iOS/Tombo/Tombo/Folder-48.png b/iOS/Tombo/Tombo/Folder-48.png
new file mode 100644 (file)
index 0000000..ebb25b1
Binary files /dev/null and b/iOS/Tombo/Tombo/Folder-48.png differ
index b2dc76b..a282608 100644 (file)
 {
     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
 
-    NSDate *object = [_objects objectAtIndex:indexPath.row];
-    cell.textLabel.text = [object description];
+    FileItem *fItem = [_objects objectAtIndex:indexPath.row];
+    cell.textLabel.text = [fItem name];
+    if (fItem.isDirectory) {
+        cell.imageView.image = [UIImage imageNamed:@"Folder-32"];
+    } else {
+        cell.imageView.image = [UIImage imageNamed:@"TextDocument-32"];
+    }
     return cell;
 }
 
diff --git a/iOS/Tombo/Tombo/TextDocument-32.png b/iOS/Tombo/Tombo/TextDocument-32.png
new file mode 100644 (file)
index 0000000..677d0d3
Binary files /dev/null and b/iOS/Tombo/Tombo/TextDocument-32.png differ
diff --git a/iOS/Tombo/Tombo/TextDocument-48.png b/iOS/Tombo/Tombo/TextDocument-48.png
new file mode 100644 (file)
index 0000000..db5d380
Binary files /dev/null and b/iOS/Tombo/Tombo/TextDocument-48.png differ