Swift code to change the Wallpaper for all screens. Currently, it changes only the current spaces' wallpaper. I'm working on a version to change in all spaces.
Usage: WallpaperChanger "/Users/username/SomeFolder/SomePicture.jpg"
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
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); | |
// Can currently do this | |
func titleForSection1(section: Int) -> String? { | |
switch section { | |
case 0: return "Foo" | |
case 1: return "Bar" | |
default: return nil | |
} | |
} | |
// But I want to do this to remove the redundant returns |
@implementation UIScrollView (ZoomToPoint) | |
/** | |
Zooms into the specified point of the scroll view's zoomable content view at the supplied scaled. | |
(The zoomable content view is the view that is returned in `viewForZoomingInScrollView:` | |
@param zoomPoint - In terms of the scroll view's co-ordinate space, the point to zoom to | |
@param scale - A value between minimumZoomScale and maximumZoomScale in which to zoom to. | |
@param animated - Whether the transition is animated, or instant | |
let styles: [UIFont.TextStyle] = [ | |
// iOS 17 | |
.extraLargeTitle, .extraLargeTitle2, | |
// iOS 11 | |
.largeTitle, | |
// iOS 9 | |
.title1, .title2, .title3, .callout, | |
// iOS 7 | |
.headline, .subheadline, .body, .footnote, .caption1, .caption2, | |
] |
// | |
// RecordAudio.swift | |
// | |
// This is a Swift class (updated for Swift 5) | |
// that uses the iOS RemoteIO Audio Unit | |
// to record audio input samples, | |
// (should be instantiated as a singleton object.) | |
// | |
// Created by Ronald Nicholson on 10/21/16. | |
// Copyright © 2017,2019 HotPaw Productions. All rights reserved. |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2016 Jansel Valentin | |
// | |
// 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 | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
let defaultFontSizeTable = [ | |
UIFontTextStyleHeadline: [ | |
UIContentSizeCategoryAccessibilityExtraExtraExtraLarge: 26, | |
UIContentSizeCategoryAccessibilityExtraExtraLarge: 25, | |
UIContentSizeCategoryAccessibilityExtraLarge: 24, | |
UIContentSizeCategoryAccessibilityLarge: 24, | |
UIContentSizeCategoryAccessibilityMedium: 23, | |
UIContentSizeCategoryExtraExtraExtraLarge: 23, | |
UIContentSizeCategoryExtraExtraLarge: 22, | |
UIContentSizeCategoryExtraLarge: 21, |
#!/usr/bin/env node | |
var fs = require("fs"); | |
var argv = process.argv.slice(2); | |
var exec = require('await-exec'); | |
class Photo { | |
constructor(id) { | |
this.id = id; | |
this.filename = null; |