ib 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +18 -3
  2. data/lib/ib/project.rb +1 -1
  3. data/lib/ib/version.rb +1 -1
  4. metadata +4 -4
data/README.md CHANGED
@@ -45,6 +45,8 @@ Extend your controllers with IB module:
45
45
  ```ruby
46
46
  class SuperController < UIViewController
47
47
 
48
+ extend IB
49
+
48
50
  # define attribute accessor
49
51
  attr_accessor title
50
52
 
@@ -52,17 +54,30 @@ class SuperController < UIViewController
52
54
  ib_outlet :title, UILabel
53
55
 
54
56
  # define action method
55
- def onclick UIButton * button
56
-
57
+ def ontouch button
58
+ title.text = "Touched!!!"
57
59
  end
58
60
 
59
61
  # define ib action
60
- ib_action :onclick
62
+ ib_action :ontouch
61
63
  end
62
64
  ```
63
65
 
64
66
  Run `rake design` create Storyboard or nibs (put them in resources folder) and you will be able to bind outlets and actions to your ruby code.
65
67
 
68
+ **Note** : add ui.xcodeproj to your .gitignore
69
+
70
+ # Sample app
71
+
72
+ Here is [sample app](https://github.com/yury/ibsample)
73
+
74
+ 1. clone it
75
+ 2. run `bundle`
76
+ 3. run `rake design` to change story board
77
+ 4. run `rake` to run app in simulator
78
+
79
+ **Note** : this app is build for iOS 6.0 beta 2
80
+
66
81
  ## Contributing
67
82
 
68
83
  1. Fork it
data/lib/ib/project.rb CHANGED
@@ -12,7 +12,7 @@ class IB::Project
12
12
  files = [Xcodeproj::Project::PBXNativeTarget::SourceFileDescription.new(stubs_path, nil, nil)]
13
13
 
14
14
 
15
- Dir.glob("#{resources_path}/**/*.{png,jpg,jpeg,storyboard,xib}") do |file|
15
+ Dir.glob("#{resources_path}/**/*.{xcdatamodeld,png,jpg,jpeg,storyboard,xib}") do |file|
16
16
  files << Xcodeproj::Project::PBXNativeTarget::SourceFileDescription.new(Pathname.new(file), nil, nil)
17
17
  end
18
18
 
data/lib/ib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module IB
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-11 00:00:00.000000000 Z
12
+ date: 2012-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: xcodeproj
@@ -84,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  segments:
86
86
  - 0
87
- hash: 1859734477769846391
87
+ hash: -2447357950835511794
88
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  segments:
95
95
  - 0
96
- hash: 1859734477769846391
96
+ hash: -2447357950835511794
97
97
  requirements: []
98
98
  rubyforge_project:
99
99
  rubygems_version: 1.8.24