Skip to content

Instantly share code, notes, and snippets.

@hujunfeng
hujunfeng / Root.plist
Last active November 21, 2024 21:35
Add version in Settings.bundle for iOS apps
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>DefaultValue</key>
<string></string>
<key>Key</key>
@hujunfeng
hujunfeng / random.swift
Last active January 2, 2016 18:54 — forked from mattt/random.swift
import Darwin
extension Int {
static func random() -> Int {
return Int(arc4random_uniform(UInt32(Int.max)))
}
static func random(range: Range<Int>) -> Int {
return Int(arc4random_uniform(UInt32(range.endIndex - range.startIndex))) + range.startIndex
}
Pod::Spec.new do |spec|
spec.name = 'YahooSearchKit'
spec.platform = :ios, '7.0'
spec.version = '0.5.0'
spec.summary = "Yahoo Search SDK for iOS"
spec.license = { :type => 'Yahoo', :text => 'Yahoo Confidential' }
spec.homepage = 'https://github.com/yahoo/searchsdk-ios'
spec.author = {
'Mobile Search' => '[email protected]'
}
Pod::Spec.new do |s|
s.name = "MediaKit"
s.version = "0.1"
s.summary = "MediaKit for iOS"
s.homepage = "http://www.2359media.com"
s.author = '2359 Media'
s.source = { :git => "https://github.com/2359media/MediaKit-iOS.git", :branch => 'experimental' }
s.platform = :ios, '7.0'
s.license = { :type => 'Copyright', :text => <<-LICENSE
@hujunfeng
hujunfeng / wwdc15-session-titles
Created June 13, 2015 04:56
WWDC 2015 Session Titles
101: Keynote
102: Platforms State of the Union
103: Apple Design Awards
104: What's New in Xcode
105: Introducing WatchKit for watchOS 2
106: What's New in Swift
107: What's New in Cocoa Touch
108: Building Watch Apps
201: iOS Accessibility
202: What's New in Cocoa
[diff]
tool = Kaleidoscope
[difftool]
prompt = false
[merge]
tool = Kaleidoscope
[mergetool]
prompt = false
keepBackup = true
[difftool "Kaleidoscope"]

Embrace iOS 8 App Extensions to Reach More Users

An iOS app is sandboxed to protect unintentional access of its content from malicious software. App sandboxing is a great way to keep iOS apps in a safe environment. An iOS app basically lives in its own world. However, it also creases the difficulties for apps to collaborate. For example, a user might want to take a photo with the Camera app (because it can be opened quickly from lock screen), and share the photo with Instagram. Because of sandboxing, The Instagram app cannot directly access the photo image inside the Camera Roll, but it needs to copy the

@hujunfeng
hujunfeng / wwdc14-sessions-titles
Last active May 8, 2021 06:18
WWDC 2014 sessions titles list
102 Platforms State of the Union
103 Apple Design Awards
201 Advanced Topics in Internationalization
202 What's New in Cocoa Touch
203 Introducing HealthKit
204 What's New in Cocoa
205 Creating Extensions for iOS and OS X, Part 1
206 Introducing the Modern WebKit API
207 Accessibility on OS X
@hujunfeng
hujunfeng / ios7statusbar.md
Last active March 20, 2019 14:20
About iOS 7 Status Bar Style

UIStatusBarStyle in iOS 7

  • The status bar in iOS 7 is transparent, the view behind it shows through.

  • The style of the status bar refers to the appearances of its content. In iOS 7, the status bar content is either dark (UIStatusBarStyleDefault) or light (UIStatusBarStyleLightContent). Both UIStatusBarStyleBlackTranslucent and UIStatusBarStyleBlackOpaque are deprecated in iOS 7.0. Use UIStatusBarStyleLightContent instead.

How to change UIStatusBarStyle

  • If below the status bar is a navigation bar, the status bar style will be adjusted to match the navigation bar style (UINavigationBar.barStyle):