pass-data

Getting data from json once and use it in 3 fragment

倾然丶 夕夏残阳落幕 提交于 2019-12-10 22:19:59
问题 I am getting the data from JSON using volley, there is 3 Fragment in Activity which I have to populate these fragments with the data that I have received from JSON in MainActivity . I would like to get data from JSON once and use it in Activity and in all those 3 Fragment . I put the received data in a List like this: List<Display_Activity_Model> videoDetailList; and I send this list from activity to other fragments using an Interface like: In activity I have this method: @Override public

Pass data between two Apps by url scheme in swift?

假如想象 提交于 2019-12-09 15:11:51
问题 There are two test Apps called Sender & Receiver They communicate with each other by Url Scheme. I would like to send a String from Sender to Receiver, is that possible? Detail about the String: I both create Textfields in Sender and Receiver, I would text some String on Sender Textfield. When I click button, the String will show on the Receiver Textfield. It seems that I have to implement NSNotificationCenter.defaultCenter().postNotificationName in my Apps Receiver Here is my App Receiver

How to pass data between UIViewControllers with protocols/delegates

牧云@^-^@ 提交于 2019-12-09 13:05:13
问题 In the code below I have a ViewController ("SenderViewController"), which passes a message to the main ViewController when a button is tapped. What I don't fully understand is how does messageData() method in the main ViewController know when to listen for the message. Can someone please explain me what is triggering the messageData() method in the main ViewController ? SenderViewController: import UIKit protocol SenderViewControllerDelegate { func messageData(data: AnyObject) } class

Facebook iFrame application: How to pass data from URL Query String

吃可爱长大的小学妹 提交于 2019-12-08 23:15:17
问题 I have a Facebook application that has a picture gallery. It's build in Flex 4. I want to allow users to link to a specific image. How can that be done? The only way I see this being done is adding a GET var like &my_picture=asd.jpg in the Facebook page URL, but I don't know how to read that from the iFrame. 回答1: Yes, you can add a parameter to the querystring for this: http://app.facebook.com/yourapp?myparam=1234 Then, your app will be called like this: http://domainwhereyouhostyourapp.com

iOS SWRevealViewController - pass data between controllers

倖福魔咒の 提交于 2019-12-06 04:26:49
问题 I am using SWRevealViewController to implement a slide menu (from the left side) in my application. Everything is working fine but now I am facing a little problem.I want to pass data from my "main" view controller (the one that is full visible, and I am not calling it "frontViewController" because it seems like it is not the front one). I have tried all possiblities I can think of to access the slide menu controller and pass data to it. Here is what i have tried: (MyControllerClass*)self

iOS SWRevealViewController - pass data between controllers

僤鯓⒐⒋嵵緔 提交于 2019-12-04 12:54:12
I am using SWRevealViewController to implement a slide menu (from the left side) in my application. Everything is working fine but now I am facing a little problem.I want to pass data from my "main" view controller (the one that is full visible, and I am not calling it "frontViewController" because it seems like it is not the front one). I have tried all possiblities I can think of to access the slide menu controller and pass data to it. Here is what i have tried: (MyControllerClass*)self.revealViewController.rearViewController (MyControllerClass*)self.revealViewController.frontViewController

Pass data between two Apps by url scheme in swift?

我与影子孤独终老i 提交于 2019-12-04 02:57:39
There are two test Apps called Sender & Receiver They communicate with each other by Url Scheme. I would like to send a String from Sender to Receiver, is that possible? Detail about the String: I both create Textfields in Sender and Receiver, I would text some String on Sender Textfield. When I click button, the String will show on the Receiver Textfield. It seems that I have to implement NSNotificationCenter.defaultCenter().postNotificationName in my Apps Receiver Here is my App Receiver code: In Appdelegate func application(application: UIApplication, openURL url: NSURL, sourceApplication:

How to pass data between UIViewControllers with protocols/delegates

不问归期 提交于 2019-12-03 15:49:57
In the code below I have a ViewController ("SenderViewController"), which passes a message to the main ViewController when a button is tapped. What I don't fully understand is how does messageData() method in the main ViewController know when to listen for the message. Can someone please explain me what is triggering the messageData() method in the main ViewController ? SenderViewController: import UIKit protocol SenderViewControllerDelegate { func messageData(data: AnyObject) } class SenderViewController: UIViewController { @IBOutlet weak var inputMessage: UITextField! var delegate:

C# MVC No submit pass object between views

 ̄綄美尐妖づ 提交于 2019-12-02 01:16:17
I am sorry for my typos.I am working on proof of concept C# ASP.NET MVC application where I need to pass data between two views when there is no post and get. One view launches a modal dialog and I need communication between them. We are using JQuery. I have a view called Charges.cshtml with a data grid. The first column of the datagrid may have span element or a link element depending on a property which will tell whether the charge have single or multiple descriptions. The view looks like below. If the charge has multiple descriptions user will click the corresponding description link(

Swift delegate beetween two VC without segue

萝らか妹 提交于 2019-12-01 12:33:14
I have 3 classes: ChatLogControoller GetImageFromLibraty(NSObject class) ImagePreviewViewController I want to press a clip from the first VC, then open the media library to pick an image. Then the selected image is passed to the third VC as a previewController. Then if I select 'done' I want to pass it to the first VC. 1st VC class ChatLogControoller: UICollectionViewController, UICollectionViewDelegateFlowLayout, NSFetchedResultsControllerDelegate, UINavigationControllerDelegate, UIImagePickerControllerDelegate, DataSentDelegate { func recievePhoto(data: UIImage) { imageFromView = data print(