This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CategoryCell < UITableViewCell | |
| def rmq_build | |
| rmq(self.contentView).tap do |q| | |
| # Add your subviews, init stuff here | |
| # @foo = q.append(UILabel, :foo).get | |
| # | |
| # Or use the built-in table cell controls, if you don't use | |
| # these, they won't exist at runtime | |
| # q.build(self.imageView, :cell_image) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ItemCell < UITableViewCell | |
| def rmq_build | |
| rmq(self.contentView).tap do |q| | |
| # Add your subviews, init stuff here | |
| # @foo = q.append(UILabel, :foo).get | |
| # | |
| # Or use the built-in table cell controls, if you don't use | |
| # these, they won't exist at runtime | |
| # q.build(self.imageView, :cell_image) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def application(application, didFinishLaunchingWithOptions:launchOptions) | |
| @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) | |
| initAFNetworkingClient | |
| Colors.fetch(AFMotion::Client) do |data| | |
| main_controller = ColorController.alloc.initWithData(data) | |
| @window.rootViewController = UINavigationController.alloc.initWithRootViewController(main_controller) | |
| @window.rootViewController.navigationBar.barTintColor = '#DF533B'.to_color | |
| @window.rootViewController.navigationBar.translucent = true | |
| @window.rootViewController.navigationBar.tintColor = UIColor.whiteColor | |
| @window.rootViewController.navigationBar.setTitleTextAttributes({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Formotion | |
| module RowType | |
| class QuoteRow < StringRow | |
| def add_callbacks(field) | |
| super | |
| field.should_change? do |field, range, new_string| | |
| newlength = field.text.length + new_string.length - range.length | |
| if newlength > 34 | |
| false | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyController < UIViewController | |
| .... | |
| def viewDidLoad | |
| @note_table = rmq(self.view).append(UITableView, :top_stylesheet).get | |
| @note_table_delegate = NoteTableDelegate.new | |
| @note_table.delegate = @note_table_delegate | |
| @note_table.dataSource = @note_table_delegate | |
| @note_table.separatorColor = UIColor.clearColor | |
| end | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class NotesCell < UITableViewCell | |
| def rmq_build | |
| rmq(self.contentView).tap do |q| | |
| @note = q.append(UILabel, :note_label).get | |
| end | |
| end | |
| def update(data) | |
| @note.text = data[:note] | |
| @note.lineBreakMode = UILineBreakModeWordWrap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| activity_vc = UIActivityViewController.alloc.initWithActivityItems(["Hey! I thought you might like \"#{item_name}\" \n\nCheck it out here: ", NSURL.URLWithString("http://myqirc.com/?rec="+encoded_rec)], applicationActivities:nil) | |
| activity_vc.setValue(item_name, forKey: 'subject') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| item = "Jalapeño" #does not work - gives BAD URL error | |
| item = "Jalapeno" #does work | |
| client.shared.get("myapi/#{item}") do |result| | |
| if result.success? | |
| block.call(result.object) | |
| else | |
| puts result.error.to_s | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //getters of java class | |
| //returns [0] = "something, -33.89, 151.2" [1] = "beach, -33.9, 15.02" etc. | |
| public List<String> getVals() { | |
| return vals; | |
| } | |
| public String getGoogleClass() { | |
| if (vals.size() == 0) | |
| return ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="map_wrapper"> | |
| <div data-sly-use.ev="Evernote" | |
| class="mapping" | |
| title="${ev.title || ''}" | |
| data-emptytext="Evernote Asset" | |
| id="${ev.googleClass || ''}" | |
| > | |
| </div> | |
| </div> |