i am wondering that if it is possible to set the delegate of input stream to another class. So far all examples i have encountered are with self:
[inputStream setDelegate:self].
I want to set delegate to another class like a ViewController not self. Thanks in advance.
iOS - Setting delegate of input stream to another class
1.8k Views Asked by M. Salih Kocak At
2
There are 2 best solutions below
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in DELEGATES
- What is the purpose of the keyword "by" (property delegates) when declaring a MutableState<T> with remember?
- How to dispose delegate in blazor or c#
- What is the difference between "Action<object?, EventArgs>" and "EventHandler(object? sender, EventArgs e)"?
- Function pointer on generic class delegate
- Unable to call main function in VS 2022
- Error when casting System.Action using contravariance in C#
- Multiple instances using delegates in unity c#
- View Modifier Doesn't Update @State
- initialization order with delegates and multiple view controllers is not working
- Delegate does not trigger method
- Persuading Kestrel to log my preferred handler name instead of "Wrapper"
- If I have an inline expression, will all references to that expression be the same for the lifetime of an application?
- Memory Leak caused by Roslyn, how do I contain it?
- Delegate to an instance method cannot have null 'this' discord.net
- QTreeView, how to use the enabled sibling column's background colour in disabled column in delegate paint method
Related Questions in INPUTSTREAM
- Cant read the whole response from the HttpURLConnection I want to achieve that for My Proxy Server?
- Scanning files with ClamAV, while using different inputstreams
- PNG file corrupted after calling ImageReader getHeigth
- Can I modify the bytes which are requested to read but not read in reality of InputStream?
- How to decode extracted text from pdf file in android kotlin?
- Unable to get BufferedReader to advance past the use of a Scanner object in an external java file
- Why fgets(char* buffer, int size, stdin) don't cause Segmentation Fault all time whenever given input string large enough then size of char buffer[]
- java.io.EOFException: Unexpected end of ZLIB input stream from API response
- Java : Convert an Inputstream string into file
- problem with System.in for logical testing java code in servlet
- FileInputStream vs InputStream for ResetExceptions in Amazon S3 file uploading
- Making a FormDataBodyPart from a CyperInputStream
- java.io.FileNotFoundException: C:\Users\HOME\AppData\Local\Temp (Access Denied)
- Jackson YAMLParser can't read input stream
- Webview block ads InputStream from url not working
Related Questions in NSINPUTSTREAM
- Swift: Read/Write & connection problems with I/O streams and URLSessionStreamTask
- Can NSInputStream be used to read chunks of data with offset to be able to upload large files
- Read numbers from file using NSInputStream
- Memory issue while converting big video file path to NSData. How to use InputStream/FileHandle to fix this issue?
- InputStream never calls hasBytesAvailable
- SocketStream::read crashes
- How to connect to wss socket where host name has additional path using NSStream?
- How convert NSInputStream to UIImage
- Video streaming via NSInputStream and NSOutputStream
- iOS : NSInputStream / NSOutputStream - CFNetwork SSLHandshake failed (-9806)
- What's the best way to consume the bytes of NSData?
- How to convert NSStream (NSInputStream / NSOutputStream) to SSL after stream opened?
- How to convert NSInputStream to NSString or how to read NSInputStream
- Bytes are changed after encoding NSString into NSInputStream via NSData
- How to search an Image file
Related Questions in CFREADSTREAM
- Get the content length without storing the data locally
- I want to stream a video using node js from an on prem video library, not a file system
- Google Cloud Function returns undefined on bucket finalize buffer. Unable to debug code
- CFReadStreamOpen Returns Error kCFStreamErrorDomainPOSIXDomain
- CFStream with TLS
- Twitter Streaming API - Objective-C
- StreamDelegate stops to receive events after a amount of readings in swift
- Handling errors in CFReadStream - Obj-C
- Sending value of an array to client alongside javascript file via readStream?
- Unable to write using CFWriteStream
- NSOutputStream's hasSpaceAvailable method always returns False
- How to Submit Permission(read_stream, publish_actions) for Review on Facebook
- Keep alive UDP socket in background for ios
- Reasoning behind CFReadStreamCreateForHTTPRequest in OSX/IOS
- Reading Data from CFReadStream and Converting it into NSString
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
if your
ViewControlleris responding toNSStreamDelegate, you can initiate an instance of the controller and set the delegate as usual.-
for example
update:
use an id or
UIViewController<NSStreamDelegate>variable in theTCPConnectionclass to hold the parent.For example:
...
Or a singlton solution, where you always call only
and have only one instance of this class. For the most cases the best way ;)