Since monterey update does not allow us to use Xcode previous than 13, let's show how to "install previous SDKs"
Swift toolchains, from https://swift.org/download/
Previous Xcode.xip, from the https://developer.apple.com
#!/bin/bash | |
# --------------------------------------------------------------------------------------------------------- | |
# place as many old macOS SDKs into the directory with this script e.g. if you have | |
# | |
# my-macpro:SDKs natb$ ls -ahl | |
# total 4254792 | |
# drwxr-xr-x 17 natb admin 578B Nov 21 2017 . | |
# drwxrwxr-x 24 root admin 884B Aug 29 06:46 .. | |
# drwxr-xr-x 5 natb admin 170B Oct 17 2017 MacOSX10.10.sdk |
Since monterey update does not allow us to use Xcode previous than 13, let's show how to "install previous SDKs"
Swift toolchains, from https://swift.org/download/
Previous Xcode.xip, from the https://developer.apple.com
SDK_VERSION=$1 | |
SDK_NAME="MacOSX${SDK_VERSION}.sdk" | |
TAR_FILE_NAME="${SDK_NAME}.tar.xz" | |
DOWNLOAD_URL="https://github.com/phracker/MacOSX-SDKs/releases/download/MacOSX10.11.sdk/${TAR_FILE_NAME}" | |
TAR_FILE_DEST="/tmp/${TAR_FILE_NAME}" | |
SDK_MIN_VERSION_FILE="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist" | |
SDK_DIR="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/" | |
echo Downloading $SDK_NAME | |
curl -L $DOWNLOAD_URL -o $TAR_FILE_DEST --progress-bar |
final class SampleViewController: StoryboardBackedViewController { | |
// Unfortunately this must be an IUO var, so that we can set the value after super.init | |
private var member: Foo! | |
// Proper dependency injection in a storyboard backed VC! | |
init(foo: Foo) { | |
super.init(storyboardIdentifier: "SampleViewControllerIdentifier") | |
// We have to set the members *after* calling super.init, since it changes the instance of `self`. | |
self.member = foo |
[Android Transition Framework][transition-framework] can be used for three main things:
import android.os.SystemClock; | |
import android.support.v4.util.LruCache; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* An Lru Cache that allows entries to expire after | |
* a period of time. Items are evicted based on a combination | |
* of time, and usage. Adding items past the {@code maxSize} |
To remove a submodule you need to: | |
Delete the relevant line from the .gitmodules file. | |
Delete the relevant section from .git/config. | |
Run git rm --cached path_to_submodule (no trailing slash). | |
Commit and delete the now untracked submodule files. |
Android has a dedicated XML namespace intended for tools to be able to record information in XML files, and have that information stripped when the application is packaged such that there is no runtime or download size penalty. The namespace URI is http://schemas.android.com/tools and is usually bound to the tools: prefix:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
public class SomeFragment extends Fragment { | |
MapView mapView; | |
GoogleMap map; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
View v = inflater.inflate(R.layout.some_layout, container, false); | |