Skip to content

Commit b7509df

Browse files
committed
make notes of future plans, remove old and unused stuff
1 parent 37e0aca commit b7509df

12 files changed

+27
-87
lines changed

lib/motion/RMXAutoLayoutScrollView.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# @todo - deprecate?
12
class RMXAutoLayoutScrollView < UIScrollView
23
class FollowView < UIView
34
RMX.new(self).weak_attr_accessor :fittedView

lib/motion/RMXCommonMethods.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# @todo - deprecate?
12
module RMXCommonMethods
23

34
def description

lib/motion/RMXLongTask.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# end
1313
# end
1414
#
15+
# @todo - refactor
1516
module RMXLongTask
1617

1718
def self.createSignal(desc=nil, &block)

lib/motion/RMXRACAssignmentHelper.rb

Lines changed: 0 additions & 11 deletions
This file was deleted.

lib/motion/RMXSegmentedController.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# @todo - check
12
class RMXSegmentedController < RMXViewController
23

34
attr_accessor :index_on_load

lib/motion/RMXViewControllerPresentation.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def viewStateSignal
2121
sub.sendNext(v)
2222
}.weak!)
2323

24+
# @todo - deprecate
2425
rac_signalForSelector('viewWillAppear:').subscribeNext(->(tuple) { appearing(tuple.first) }.weak!)
2526
rac_signalForSelector('viewDidAppear:').subscribeNext(->(tuple) { appeared(tuple.first) }.weak!)
2627
rac_signalForSelector('viewWillDisappear:').subscribeNext(->(tuple) { disappearing(tuple.first) }.weak!)
@@ -41,15 +42,19 @@ def viewStateFilteredOnceSignal(state)
4142
viewStateFilteredSignal(state).take(1)
4243
end
4344

45+
# @todo - deprecate
4446
def appearing(animated)
4547
end
4648

49+
# @todo - deprecate
4750
def appeared(animated)
4851
end
4952

53+
# @todo - deprecate
5054
def disappearing(animated)
5155
end
5256

57+
# @todo - deprecate
5358
def disappeared(animated)
5459
end
5560

lib/motion/UIResponder+RMX.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# @todo - deprecate, not being used anywhere right now
12
class UIResponder
23

34
Dispatch.once do

lib/motion/accessors.rb

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,4 @@ def weak_attr_accessor(*attrs)
2626
end
2727
end
2828

29-
def synchronized_kvo_attr_accessor(*attrs)
30-
if object = unsafe_unretained_object
31-
attrs.each do |attr|
32-
_attr = attr.to_s
33-
object.send(:define_method, _attr) do
34-
RMX.new(self).sync_ivar(_attr)
35-
end
36-
object.send(:define_method, "#{_attr}=") do |val|
37-
RMX.new(self).kvo_sync_ivar(_attr, val)
38-
end
39-
end
40-
end
41-
end
42-
4329
end

lib/motion/instance_variables.rb

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,4 @@ def ivar(*args, &block)
2929
end
3030
end
3131

32-
IVAR_LOCK = NSLock.new
33-
34-
def sync_ivar(*args, &block)
35-
IVAR_LOCK.lock
36-
res = ivar(*args, &block)
37-
IVAR_LOCK.unlock
38-
res
39-
end
40-
41-
def kvo_sync_ivar(*args, &block)
42-
res = nil
43-
if object = unsafe_unretained_object
44-
key = args[0].to_s
45-
object.willChangeValueForKey(key)
46-
IVAR_LOCK.lock
47-
res = ivar(*args, &block)
48-
IVAR_LOCK.unlock
49-
object.didChangeValueForKey(key)
50-
end
51-
res
52-
end
53-
54-
def nil_instance_variables!
55-
if object = unsafe_unretained_object
56-
ivars = [] + object.instance_variables
57-
while ivar = ivars.pop
58-
object.instance_variable_set(ivar, nil)
59-
end
60-
true
61-
end
62-
end
63-
6432
end

lib/motion/rac_app_signals.rb

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -321,42 +321,34 @@ def self.rac_appSignal(name)
321321
@lastActivatedAt = Time.now
322322
})
323323

324-
rac_appSignal(UIApplicationDidEnterBackgroundNotification).subscribeNext(->(v) {
325-
if DEBUG_APP_STATE
326-
NSLog("*** UIApplicationDidEnterBackgroundNotification: #{v.description}")
327-
end
328-
})
329-
330-
rac_appSignal(UIApplicationWillEnterForegroundNotification).subscribeNext(->(v) {
331-
if DEBUG_APP_STATE
332-
NSLog("*** UIApplicationWillEnterForegroundNotification: #{v.description}")
333-
end
334-
})
335-
336324
rac_appSignal(UIApplicationWillResignActiveNotification).subscribeNext(->(v) {
337325
if DEBUG_APP_STATE
338326
NSLog("*** UIApplicationWillResignActiveNotification: #{v.description}")
339327
end
340328
@lastResignedAt = Time.now
341329
})
342330

343-
rac_appSignal(UIApplicationWillTerminateNotification).subscribeNext(->(v) {
344-
if DEBUG_APP_STATE
331+
if DEBUG_APP_STATE
332+
rac_appSignal(UIApplicationDidEnterBackgroundNotification).subscribeNext(->(v) {
333+
NSLog("*** UIApplicationDidEnterBackgroundNotification: #{v.description}")
334+
})
335+
336+
rac_appSignal(UIApplicationWillEnterForegroundNotification).subscribeNext(->(v) {
337+
NSLog("*** UIApplicationWillEnterForegroundNotification: #{v.description}")
338+
})
339+
340+
rac_appSignal(UIApplicationWillTerminateNotification).subscribeNext(->(v) {
345341
NSLog("*** UIApplicationWillTerminateNotification: #{v.description}")
346-
end
347-
})
342+
})
348343

349-
rac_appSignal(RMXApplicationDidBecomeActiveFromBackground).subscribeNext(->(v) {
350-
if DEBUG_APP_STATE
344+
rac_appSignal(RMXApplicationDidBecomeActiveFromBackground).subscribeNext(->(v) {
351345
NSLog("*** RMXApplicationDidBecomeActiveFromBackground: #{v.description}")
352-
end
353-
})
346+
})
354347

355-
rac_appSignal(RMXApplicationDidBecomeActiveFromForeground).subscribeNext(->(v) {
356-
if DEBUG_APP_STATE
348+
rac_appSignal(RMXApplicationDidBecomeActiveFromForeground).subscribeNext(->(v) {
357349
NSLog("*** RMXApplicationDidBecomeActiveFromForeground: #{v.description}")
358-
end
359-
})
350+
})
351+
end
360352

361353
end
362354

0 commit comments

Comments
 (0)