WWDC 2006 2007 2008 2009 2010 2011 2012 2013 2014
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
// | |
// SnapCarousel.swift | |
// prototype5 | |
// | |
// Created by xtabbas on 5/7/20. | |
// Copyright © 2020 xtadevs. All rights reserved. | |
// | |
import SwiftUI |
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
public class UserAgent { | |
public static let userAgent: String? = { | |
guard let info = Bundle.main.infoDictionary, | |
let appNameRaw = info["CFBundleDisplayName"] ?? info[kCFBundleIdentifierKey as String], | |
let appVersionRaw = info[kCFBundleVersionKey as String], | |
let appName = appNameRaw as? String, | |
let appVersion = appVersionRaw as? String | |
else { return nil } | |
#if canImport(UIKit) |
Foundation offers a Thread class, internally based on pthread
, that can be used to create new threads and execute closures.
// Detaches a new thread and uses the specified selector as the thread entry point.
Thread.detachNewThreadSelector(selector: Selector>, toTarget: Any, with: Any)
// Subclass
class MyThread: Thread {
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
[ | |
{"url": "https://devstreaming-cdn.apple.com/videos/wwdc/2018/236mwbxbxjfsvns4jan/236/236_hd_avspeechsynthesizer_making_ios_talk.mp4?dl=1", "title": "AVSpeechSynthesizer: Making iOS Talk", "summary": "Speech can enhance the audio experience of your app, whether you are generating spoken feedback for accessibility, or providing critical information beyond simple alerts or notifications. AVSpeechSynthesizer produces synthesized speech from text and allows you to control and monitor the progress of ongoing speech. Learn the ins and outs of AVSpeechSynthesizer and how to add computer-generated speech output to your app."}, | |
{"url": "https://devstreaming-cdn.apple.com/videos/wwdc/2018/405bjty1j94taqv8ii/405/405_hd_measuring_performance_using_logging.mp4?dl=1", "title": "Measuring Performance Using Logging", "summary": "Learn how to use signposts and logging to measure performance. Understand how the Points of Interest instrument can be used to examine logged data. Get an introduction into creating and using custo |
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 UITabBarController { | |
/** | |
Show or hide the tab bar. | |
- Parameter hidden: `true` if the bar should be hidden. | |
- Parameter animated: `true` if the action should be animated. | |
- Parameter transitionCoordinator: An optional `UIViewControllerTransitionCoordinator` to perform the animation | |
along side with. For example during a push on a `UINavigationController`. | |
*/ |
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
public extension MKMultiPoint { | |
var coordinates: [CLLocationCoordinate2D] { | |
var coords = [CLLocationCoordinate2D](repeating: kCLLocationCoordinate2DInvalid, | |
count: pointCount) | |
getCoordinates(&coords, range: NSRange(location: 0, length: pointCount)) | |
return coords | |
} | |
} |
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
// | |
// UITextViewPlaceholder.swift | |
// TextViewPlaceholder | |
// | |
// Copyright (c) 2017 Tijme Gommers <tijme@finnwea.com> | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
// Having array of coordinates you would like show on map you have calculate center and span for map. | |
// For that you need min/max latitude/longitude of coordinates. | |
let coordinates = [(CLLocationCoordinate2D(latitude:-40.0, longitude:38.2)), | |
(CLLocationCoordinate2D(latitude:44.2, longitude:17.833)), | |
(CLLocationCoordinate2D(latitude:5.22, longitude:154.2)), | |
(CLLocationCoordinate2D(latitude:33.2, longitude:9.2)), | |
(CLLocationCoordinate2D(latitude:4.2, longitude:3.2))] | |
// Lookup is done with one pass on array with only reduce |
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
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
NewerOlder