原创 json轉換格式錯誤
服務器壓縮字符,解壓拼接後表面看的是json串,但是轉json就報格式錯誤,經過半天的測試發現是裏邊多了一些轉義字符,所以添加了以下代碼: NSString* jsonStr = [valueStr stringByTrim
原创 Hello Android
第一步新建工程,File->new->new project 填好後點擊Next, 然後選擇最小支持到的版本,我這裏選擇的是4.3 然後點擊next, 選擇 點擊next, 已經建好一個工程 點擊 看到已經起來了,但是顯示了Hell
原创 2:RelativeLayout
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" x
原创 第三方鍵盤跳轉宿主app
1:爲主app設置Url Scheme 參考 http://blog.csdn.net/tianbing878/article/details/75642657 2:將下邊代碼中的testApp://改爲你宿主app的Url Scheme
原创 Andriod佈局
安卓頁面搭建: 安卓頁面與iOS頁面不同,安卓的頁面是由View和View Group構成,View Group是佈局容器,裏邊可以繼續放View Group,也可以放View。 View是一個一個的控件。(這個我還不知道具體使用是怎麼樣
原创 1:LinearLayout
直接上代碼: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/an
原创 iOS設備型號
所有設備型號對應的官網地址: 官網地址: https://www.theiphonewiki.com/wiki/Models 如果你懶得整理了,直接複製我下邊代碼: + (NSString *)getDeviceType {
原创 3:TableLayout
<?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" xmln
原创 iOS launch、icon
icon 尺寸: 40*40 60*60 58*58 87*87 80*80 120*120 180*180 1024*1024(app store用可以是jpg) launch圖: 640*960 640*1136 1242*22
原创 iOS模擬鍵盤長按刪除
最近做第三方鍵盤開發,模擬鍵盤的長按刪除 刪除按鈕上添加長按事件: UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizeralloc] init
原创 launch尺寸 包含iPhone X
官方文檔:https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/launch-screen/Device
原创 Andriod開始
最近不是很忙,想着學習下Andriod開發,希望自己能堅持寫博客,堅持學習下去 第一篇,環境搭建 我目前發現大家應該都是用的Android studio,那就從Android studio 3.0開始吧,分享大家mac版下載
原创 iOS字符串反轉
- (void)reverse { NSString* str = @"abcdefghigklmnopqrst"; int length = (int)str.length; NSMutableString *f
原创 C語言合併數組
有兩個升序的數組,合成一個非降序的數組 #include <stdio.h> int main(int argc, const char * argv[]) { // insert code here... int
原创 iOS 設置Url Scheme
如果需要通過鏈接打開app,則需要爲app設置Url Scheme 設置方法如下: 1:在Info.plist裏添加URL Types 2:在URL Types裏添加屬性URL identifier和URL Schemes 3:URL i