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 func showSafariWebWith(urlString:String,inView view:UIViewController){ | |
let url = NSURL(string: urlString as String) | |
if #available(iOS 9.0, *) { | |
//let safariVC = SFSafariViewController(URL: url!) | |
let safariVC = SFSafariViewController(URL: url!, entersReaderIfAvailable: true) | |
safariVC.view.tintColor = UIColor(red: 189/255.0, green: 151/255.0, blue: 8/255, alpha: 1) | |
view.presentViewController(safariVC, animated: true, completion: nil) |
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 func animateCell(cell:UITableViewCell) -> Void{ | |
let fadeOutAnimation:CABasicAnimation = CABasicAnimation(keyPath: "opacity") | |
fadeOutAnimation.duration = 1.0 | |
fadeOutAnimation.removedOnCompletion = false | |
fadeOutAnimation.fillMode = kCAFillModeBackwards | |
fadeOutAnimation.fromValue = NSNumber(float: 0.0) | |
fadeOutAnimation.toValue = NSNumber(float: 1.0) | |
cell.layer.addAnimation(fadeOutAnimation, forKey: "animateOpacity") | |
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 func getFormatterDate(dateString:String?)->String{ | |
let dateFormater = NSDateFormatter() | |
dateFormater.dateFormat = "yyyy-MM-dd'T'HH:mm:ss" | |
//dateFormater.dateFormat = "dd MMMM yyyy" | |
dateFormater.timeZone = NSTimeZone(abbreviation: "GMT-05:00") | |
dateFormater.timeZone = NSTimeZone(name: "America/Lima") | |
let locale:NSLocale = NSLocale(localeIdentifier: "en_US_POSIX") | |
dateFormater.locale = locale |
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 func setUpToolBar(txtField:UITextField, vista:UIViewController){ | |
let btn1:UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.FlexibleSpace, target: nil, action: nil) | |
let btn2:UIBarButtonItem = UIBarButtonItem(title: "Listo", style: UIBarButtonItemStyle.Done, target: nil, action: "hideKeyboard") | |
btn2.tintColor = UIColor.blackColor() | |
let items:NSArray = [btn1,btn2] | |
let toolBar: UIToolbar = UIToolbar(frame: CGRectMake(0,0,vista.view.frame.size.width,40)) | |
toolBar.barStyle = UIBarStyle.Default | |
toolBar.barTintColor = UIColor.lightTextColor() |
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
// properti | |
var tapper:UIGestureRecognizer! | |
// hide keyboard with tap | |
self.tapper = UITapGestureRecognizer(target: self, action: "handleSingleTapToHideKeyboard:") | |
self.view.addGestureRecognizer(self.tapper) | |
func handleSingleTapToHideKeyboard(sender:UITapGestureRecognizer) { | |
self.view.endEditing(true) | |
} |
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
# | |
# Virtual Hosts | |
# | |
# If you want to maintain multiple domains/hostnames on your | |
# machine you can setup VirtualHost containers for them. Most configurations | |
# use only name-based virtual hosts so the server doesn't need to worry about | |
# IP addresses. This is indicated by the asterisks in the directives below. | |
# | |
# Please see the documentation at | |
# <URL:http://httpd.apache.org/docs/2.2/vhosts/> |
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
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
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
var gulp = require('gulp'); | |
var coffee = require('gulp-coffee'); | |
var jade = require('gulp-jade'); | |
var stylus = require('gulp-stylus'); | |
var jeet = require('jeet'); | |
var rupture = require('rupture'); | |
var gutil = require('gulp-util'); | |
var paths ={ |
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
$(document).ready(function(){ | |
var num = 0; | |
var interval = setInterval(function(){ | |
$('#numbers').text(num); | |
num++; | |
if(num === 100){ | |
clearInterval(interval); | |
}; | |
},10); | |
}); |