                     :on-change-text #(do
                                        (reset! state %)
                                        (r/flush))
-                    :placeholder "Weight (in pounds)"
+                    :placeholder "Weight"
                     :return-key-type "done"
                     :value @state}]
+       [segmented-control {:on-change #(reset! desired-units (-> % .-nativeEvent .-selectedSegmentIndex))
+                           :selected-index @desired-units
+                           :values ["kg", "lbs"]}]
        [touchable-highlight {:style {:background-color "#999"
                                      :padding 10
                                      :border-radius 5}


;; Calculates the number of each disc required to reach a given weight.
(defn baz [accum plate-weights remaining-weight]
  (println accum plate-weights remaining-weight)
  (if (or (<= remaining-weight 0) 
          (empty? plate-weights))
    accum

(def pan-responder (r/adapt-react-class (.-PanResponder ReactNative)))
(def animated (r/adapt-react-class (.-Animated ReactNative)))
(def dimensions (r/adapt-react-class (.-Dimensions ReactNative)))
(def segmented-control (r/adapt-react-class (.-SegmentedControlIOS ReactNative)))

(def logo-img (js/require "./images/cljs.png"))

