This file contains 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 BubbleWrap | |
module Mail | |
module_function | |
# Base method to create your in-app mail | |
# --------------------------------------- | |
# EX | |
# BW::Mail.compose { | |
# delegate: self, # optional, will use root view controller by default |
This file contains 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
//Here's the same thing in Objective-C | |
#import "WebView.h" | |
@implementation WebView | |
@synthesize webView = _webView; | |
-(void) viewDidLoad | |
{ |
This file contains 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
//Here's the same thing in Objective-C | |
#import "WebView.h" | |
@implementation WebView | |
@synthesize webView = _webView; | |
-(void) viewDidLoad | |
{ |
This file contains 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 viewDidLoad | |
view.image = UIImage.imageNamed('welcome.png') | |
view.userInteractionEnabled = true | |
recognizer = UITapGestureRecognizer.alloc.initWithTarget(self, action:'nextScreen') | |
view.addGestureRecognizer(recognizer) | |
end | |
def nextScreen | |
animation = CATransition.animation |
This file contains 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
# A simple example of creating a UIView with a UICollectionView as a subview | |
# in RubyMotion using Teacup for styling | |
# | |
# Your controller will need to set the stylesheet: stylesheet :example | |
# and create this view like so: subview Example, :my_example_view | |
class Example < UIView | |
CELL_IDENTIFIER = 'example_cell' | |
def initWithFrame(frame) |
This file contains 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
app.info_plist['UIStatusBarStyle'] = 'UIStatusBarStyleBlackTranslucent' | |
app.info_plist["UIViewControllerBasedStatusBarAppearance"] = false |
This file contains 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
extension NSAttributedString { | |
func replaceHTMLTag(tag: String, withAttributes attributes: [String: AnyObject]) -> NSAttributedString { | |
let openTag = "<\(tag)>" | |
let closeTag = "</\(tag)>" | |
let resultingText: NSMutableAttributedString = self.mutableCopy() as NSMutableAttributedString | |
while true { | |
let plainString = resultingText.string as NSString | |
let openTagRange = plainString.rangeOfString(openTag) | |
if openTagRange.length == 0 { |
This file contains 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
// | |
// IssuesTableViewController.swift | |
// imuc | |
// | |
// Created by ctslin on 2015/8/4. | |
// Copyright (c) 2015年 ctslin. All rights reserved. | |
// | |
import UIKit |
This file contains 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
// | |
// TaskCell.swift | |
// imuc | |
// | |
// Created by ctslin on 2015/8/13. | |
// Copyright (c) 2015年 ctslin. All rights reserved. | |
// | |
import UIKit |
This file contains 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
#!/usr/bin/env bash | |
# login as root and run this script via bash & curl: | |
apt-get update | |
apt-get install -y build-essential bison openssl libreadline5 libreadline-dev curl \ | |
git-core zlib1g zlib1g-dev libopenssl-ruby libcurl4-openssl-dev libssl-dev \ | |
libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libmysqlclient-dev \ | |
mysql-client mysql-server |
OlderNewer