uiactionsheet


ShareKit 2.0: how to add a custom NON-SHARE item in action sheet?


I am using ShareKit in one of my projects, and there is an option to add something to favourites, other than share it, it is an option in ShareKit's action sheet, looks like I can only populate 'shares', how do I add my custom item to its action sheet and associate a selector to it or get a callback for when its tapped?
Thanks!
Probably the easiest way is to create SHKActionSheet subclass and override
+ (SHKActionSheet *)actionSheetForType:(SHKShareType)type;
- (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated;
Do not forget to set your subclass in configurator's - (Class)SHKActionSheetSubclass config method. This way you can call sharekit the same way as in the demo app, I mean you can create action sheet like this:
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
Another possibility is to create standard UIActionSheet and call each sharer's convenience methods. See the code in my other answer on SO. This is appropriate if you have only fixed number of sharers - when you do not need to use SHKShareMenu.

Related Links

Attachment action sheet hidden behind keyboard in iOS 9
Use of Actionsheet in Ionic 2
Disable WKActionSheet on WKWebView
Action sheet programatically [closed]
unrecognized selector sent to instance UIActionSheet
Using Viewcontroller to control tabbarController
ShareKit 2.0: how to add a custom NON-SHARE item in action sheet?
Fire UIActionSheet in ViewDidLoad first load only
Setting bounds for UIActionSheet?

Categories

HOME
google-cloud-platform
dns
google-spreadsheet
youtube-data-api-v3
themes
oracle-apex-5
rendering
seo
rom
google-apps
rds
pearson-correlation
missing-data
barcode
okhttp
mql5
distribution
spring-social
libc
plink
heat
internationalization
firefox-addon
template-engine
google-picker
nim
nodemcu
squashfs
systemtime
gmock
interbase
android-sharedpreferences
ms-access-web-app
failover
aws-codecommit
sql-server-2000
jmockit
code-snippets
login-script
instantiation
pdw-file-browser
yowsup
navigator
roblox
hivemq
git-rewrite-history
chef-solo
watchface
textsum
configurationmanager
carrot2
aquamacs
payload
offline.js
google-cloud-console
mongodb-php
appscale
google-query-language
deep
jaunt-api
spring-retry
terracotta
rewrite
phonertc
.bash-profile
rrule
universal-image-loader
create.js
parallel-testing
mutual-authentication
menubar
windows-embedded-standard
hibernate-entitymanager
cocoalibspotify-2.0
route-provider
css-reset
insert-id
cakephp-1.2
subproject
extconf.rb
josql
jdb
isa-swizzling
node-redis
webdev.webserver
massive
msr
mtu
cruisecontrol.rb
vs-android
burndowncharts
httpcookie
appliance

Resources

Encrypt Message