Skip to content

Instantly share code, notes, and snippets.

import com.dd.plist.*
import org.edx.builder.TaskHelper
// Dependencies
buildscript {
repositories {
mavenCentral()
}
dependencies {
extension String {
func getPartOfStringBoldandItalic(_ italicPart:String, font:UIFont)-> NSAttributedString{
let attributtedString = NSMutableAttributedString(string: self)
let attrs = [NSFontAttributeName:font]
let rangePart: NSRange = (attributtedString.string as NSString).range(of: italicPart)
attributtedString.addAttributes(attrs, range: rangePart)
return attributtedString
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window w = getWindow();
w.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
w.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
import UIKit
@objc public protocol SMDatePickerDelegate {
@objc optional func datePickerWillAppear(_ picker: SMDatePicker)
@objc optional func datePickerDidAppear(_ picker: SMDatePicker)
@objc optional func datePicker(_ picker: SMDatePicker, didPickDate date: Date)
@objc optional func datePickerDidCancel(_ picker: SMDatePicker)
//
// AppDelegate.swift
// PushNotification
//
// Created by Ganesh on 02/11/16.
//
import UIKit
import Firebase
import UserNotifications
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, CLLocationManagerDelegate {
let defaults = NSUserDefaults.standardUserDefaults()
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
name: kFIRInstanceIDTokenRefreshNotification, object: nil)
initializeTimeForTracking()
return true
//
// DCPathButton.h
// DCPathButton
//
// Created by tang dixi on 30/7/14.
// Copyright (c) 2014 Tangdxi. All rights reserved.
//
#import "DCPathItemButton.h"
// this is where i am gonna call the animation
func mapView(mapView: GMSMapView, didTapMarker marker: GMSMarker) -> Bool {
return true
}
let urlStr = "http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=1|673AB7|ffffff"
let data = NSData(contentsOfURL: NSURL(string: urlStr)!)
let img = UIImage(data: data!)
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
use_frameworks!
target 'Myna' do
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'DKChainableAnimationKit'
pod 'Charts'
pod 'JVFloatLabeledTextField'
pod 'AWSAutoScaling'