IOS 分享學習筆記

2021-07-03 09:53:24 字數 885 閱讀 3456

官網配置:

首先申請乙個key,然後按照官方的說明配置下就好了。

然後在工程裡面配置(紅色表示是分享到的應用)

[umsocialsnsservice presentsnsiconsheetview:self

sharetext:@"你要分享的文字"

shareimage:[uiimage imagenamed:@"icon.png"]

sharetosnsnames:[nsarray arraywithobjects:umsharetosina,umsharetotencent,umsharetorenren,umsharetowechatsession,umsharetowechattimeline,umsharetoqq,umsharetoqzone,umsharetoemail,nil]

delegate:self];

2.配置工程

直接配置好工程會報編譯錯誤,需要把下面的庫檔案新增進去。-----然後就可以分享了,微博,人人等。

若你的工程設定了all_load,需要新增手機qq sdk需要的系統framework:security.framework,libiconv.dylib,systemconfiguration.framework,coregraphics.framework,libsqlite3.dylib,coretelephony.framework,libstdc++.dylib,libz.dylib。詳情請參考新增qq及qzone

這邊配置好後,會報錯誤,然後新增 imageio.framework  和  mapkit.framework  就好了

3.測試結果

測試結果正常

IOS學習筆記

uiview beginanimations view flip context nil 設定動畫塊 uiview setanimationduration 1.25 動畫時間 uiview setanimationcurve uiviewanimationcurveeaseinout 動畫曲線 u...

ios學習筆記

actionsheet 標頭檔案裡加協議。ibaction buttonpressed id sender void actionsheet uiactionsheet actionsheet diddismisswithbuttonindex nsinteger buttonindex 從plis...

ios學習筆記

1.nsselectorfromstring nsstring string 從乙個字串構建乙個selector.2.字串 cocoa處理字串的類nsstring和它的子類nsmutablestring。id stringwithformat nsstring format,指可以接受以逗號分開的多...