Skip to content

Instantly share code, notes, and snippets.

@weiran
weiran / IconAndTitleLabelStyle.swift
Created July 25, 2020 11:56
SwiftUI's new `Label` has built in styles for showing only the icon, or only the title. However in some contexts `DefaultLableStyle` will only show the icon, so `IconAndTitleLabelStyle` is designed to always show both in a `HStack`.
import SwiftUI
class IconAndTitleLabelStyle: LabelStyle {
func makeBody(configuration: Configuration) -> some View {
HStack {
configuration.icon
configuration.title
}
}
}
@weiran
weiran / gist:ee59962371d5d6ed824e59b562d158c0
Created December 29, 2018 14:42
TVVLCPlayer Linking Error
Ld /Users/weiran/Library/Developer/Xcode/DerivedData/TVVLCPlayerTest-aemonahgwntrozahfsluvnepgyba/Build/Products/Debug-appletvsimulator/TVVLCPlayer/TVVLCPlayer.framework/TVVLCPlayer normal x86_64 (in target: TVVLCPlayer)
cd /Users/weiran/git/Misc/TVVLCPlayerTest/Pods
export TVOS_DEPLOYMENT_TARGET=11.0
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator12.1.sdk -L/Users/weiran/Library/Developer/Xcode/DerivedData/TVVLCPlayerTest-aemonahgwntrozahfsluvnepgyba/Build/Products/Debug-appletvsimulator/TVVLCPlayer -F/Users/weiran/Library/Developer/Xcode/DerivedData/TVVLCPlayerTest-aemonahgwntrozahfsluvnepgyba/Build/Products/Debug-appletvsimulator/TVVLCPlayer -F/Users/weiran/git/Misc/TVVLCPlayerTest/Pods/TVVLCKit -filelist /Users/weiran/Library/Developer/Xcode/DerivedData/TVVLCPlayerTest-aemonahgwntrozahfsluvnepgyba/Build/In
### Keybase proof
I hereby claim:
* I am weiran on github.
* I am weiran (https://keybase.io/weiran) on keybase.
* I have a public key whose fingerprint is 2544 C857 C8FC 807D C992 5ABD C412 B7EB 1A6B 280F
To claim this, I am signing this object:
@weiran
weiran / feed-readers-comparison.md
Last active December 19, 2015 02:48 — forked from cheeaun/feed-readers-comparison.md
Added Feed Wrangler

Feed Readers comparison

My comparison notes for web-based remotely-hosted Google Reader clones/replacements. Has to be at least 90% similar to Google Reader and not some Pinterest-like or Instapaper-like apps.

Here's a list of almost all Google Reader alternatives.

In no particular order, here goes:

CommaFeed

- (void)mobilizerButtonPressed:(id)sender {
UIButton *mobilizerButton = (UIButton *)sender;
NSString *mobilizerURLString = kMobilizerURL;
NSURL *requestURL;
if ([_currentURL.absoluteString hasPrefix:mobilizerURLString]) {
requestURL = _mobilizedURL;
[mobilizerButton setSelected:NO];
} else if (!_currentURL || [_currentURL.absoluteString isEqualToString:@""]) {