Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 

README.md

#weak_attr_accessor for RubyMotion

Usage

Do this:

class MainView < UIView
  weak_attr_accessor :view_controller
end

instead of this:

class MainView < UIView
  def view_controller
    @view_controller
  end

  def view_controller=(obj)
    if obj.nil?
      @view_controller = nil
    else
      @view_controller = WeakRef.new(obj)
    end
  end
end

Installation

  1. Add this to your Gemfile: gem 'weak_attr_accessor'
  2. Run bundle install

License

BSD. See LICENSE file.

Questions

About

weak_attr_accessor for RubyMotion

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.