Swift,swiftcodeSwift - UITableViewCell倒計時重用解決方案 效果 源碼https://github.com/YouXianMing/Swift-Animations//// CountDownTimerController.swift// Swift-Animations//// Created by YouXianMing on 16/9/4.// Copyright © 2016年 YouXianMing. All
React Native知識2-Text組件,react2-textText用於顯示文本的React組件,並且它也支援嵌套、樣式,以及觸摸處理。在下面的例子裡,嵌套的標題和本文文字會繼承來自styles.baseText的fontFamily字型樣式,不過標題上還附加了它自己額外的樣式。標題和文本會在頂部依次堆疊,並且被代碼中內嵌的分行符號分隔開。一:屬性1:allowFontScaling
Swift,swiftcodeSwift - 實現點擊cell動態修改高度 效果 源碼https://github.com/YouXianMing/Swift-Animations//// TapCellAnimationController.swift// Swift-Animations//// Created by YouXianMing on 16/8/30.// Copyright © 2016年 YouXianMing. All rights
iOS,ios9/*________________________NSString(不可變字串)________________________*/ //________________________1.字串的建立___________________________________// //建立字串常量 NSString *string1 = @"Hello"; //內容不變
Swift
Swift,swiftcodeSwift - 計算文本高度 效果 源碼//// String+StringHeight.swift// StringHeight//// Created by YouXianMing on 16/8/30.// Copyright © 2016年 YouXianMing. All rights reserved.//import UIKitextension String { /** Get the
Swift,swiftcodeSwift - 從字典(或者Alamofire)直接建立Model檔案的工具 效果1. 常規產生model的方式2. 通過debug建立model的方式 特性1. 可以處理JSON格式的字典資料 2. 可以處理本地的json資料 3. 可以處理Alamofire產生的json格式返回資料 4.
UICollectionViewCell定製Button,uicollectionviewcellUICollectionViewCell定製Button 效果 特點1.能夠動態設定每行顯示的按鈕的個數,以及控制項的擺放格式2.實現單選或者多選的功能,實現點擊事件3.自定製按鈕的顯示樣式 用法1.下載源碼後,將檔案中的GridCollectionView.h/.m檔案, CustomCollectionViewCell.h/.m檔案,
Xcode 8 新特性,xcode新特性在2016 蘋果全球開發人員大會(WWDC)期間, 蘋果一如既往地給開發人員們披露了新版的整合開發工具 – Xcode, 在過去的每一次大版本發布中,蘋果都會積極地改進開發工具,添加一些極具吸引力的新功能,今年也不例外。1. Swift 2 and 3過去每一版的Xcode 都和固定版本的Swift程式設計語言綁定在一起, Xcode 8中將不再如此,Swift 3給
UIDynamic,iosuidynamic用途: 從一個點移動到另外一個點;相關屬性: mode : UIPushBehaviorModeContinuous //推移模式 angle : setAngle //推移角度 magnitude : setMagnitude //速度
iOS 正確選擇圖片載入方式,ios正確選擇正確選擇圖片載入方式能夠對記憶體最佳化起到很大的作用,常見的圖片載入方式有下面三種://方法1 UIImage *imag1 = [UIImage imageNamed:@"image.png"]; //方法2 UIImage *image2 = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image.png" ofType:nil]]; /
Swift,swiftcodeSwift - 添加純淨的Alamofire如果你有代碼潔癖,不能容忍任何多餘的東西,請繼續往下看. 1. 下載Alamofire (https://github.com/Alamofire/Alamofire) 2. 解壓縮並開啟 Alamofire.xcworkspace 3. 刪除不必要的內容 (根據你的需求自己定) 4. 順便把檔案夾裡面的無關內容也刪除掉 5.
Swift,swiftcodeSwift - 通過疊加UILabel來實現混合的進度條 效果 源碼https://github.com/YouXianMing/Swift-Animations//// MixedColorProgressViewController.swift// Swift-Animations//// Created by YouXianMing on 16/8/21.// Copyright © 2016年 YouXianMing.
Swift,swiftcodeSwift - 多個mask的動畫效果 效果 源碼https://github.com/YouXianMing/Swift-Animations//// TranformFadeView.swift// Swift-Animations//// Created by YouXianMing on 16/8/20.// Copyright © 2016年 YouXianMing. All rights
iOS 更改webView文字顏色丶文字大小丶背景色的方法,ioswebview在webView的delegate回調方法 - (void)webViewDidFinishLoad:(UIWebView *)webView;中寫上一下語句即可 //字型大小 [webView
iOS---TextView顯示HTML文本, _checkAllIntroduceTextView = [[UITextView alloc] initWithFrame:CGRectMake(10, 0, kScreenWidth-20, kScreenHeight)]; _checkAllIntroduceTextView.backgroundColor = self.view.backgroundColor;
iOS學習,ios學習路線菜單事件包括,剪下、拷貝、全選、分享...,此 demo 只有 copy、share 1.定義 field 繼承與 UITextField- (BOOL)canPerformAction:(SEL)action withSender:(id)sender { if (action == @selector(copy:)) { return YES; } return NO;}- (void)copy:(id)sender {
NSURLSession的使用(1),nsurlsession使用一、建立一個Session,並且對其進行初始化 包含三種建立方式: 1、+ (NSURLSession *)sharedSession 單例模式 2、+ (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration 這是常規的方式 3、+ (NSURLSession
iOS畫圖,及清空,ios畫圖 1 #import "ViewController.h" 2 #import "SecondVC.h" 3 4 5 #define WIDTH [UIScreen mainScreen].bounds.size.width 6 #define HEIGHT [UIScreen mainScreen].bounds.size.height 7 8 @interface ViewController () 9 {10 UIImageView
用代碼擷取APP啟動頁圖片,用代碼擷取APP啟動頁圖片 源碼 - swift//// AppleSystemService.swift// Swift-Animations//// Created by YouXianMing on 16/8/11.// Copyright © 2016年 YouXianMing. All rights reserved.//import UIKitclass AppleSystemService : NSObject {