I am sending argument in xml feed from search bar to php page.
now what i want to do is to display no result found in table view if no match found against that argument....
Can any body tell how to do. that....
If you use a UISearchDisplayController it will display the message automatically when zero results are found. It also does a couple of other nice things.
Related
In my app I want the user to type names into a UITextField (or equivalent) and then when they press return, it will put that word(s) in a blue bubble that's usually associated with tags. The cursor then moves to the end where they can add more "tags".
This can be seen when adding contacts in the To, CC & BCC fields in the Mail app, and also when selecting contacts in the Messages app.
How is this done? Is it something that's provided in the UIKit or available somewhere else?
Many thanks,
Michael
Venmo just open sourced their token field.
https://github.com/venmo/VENTokenField.git
edited:
The equivalent control in desktop Cocoa is an NSTokenField, but there doesn't seem to be an equivalent for Cocoa Touch.
Since iOS 13 there exists UISearchTextField.
https://developer.apple.com/documentation/uikit/uisearchtextfield
You can see that component in action in the Photos App.
That should fit for many use cases. By removing the leftView you can also get rid of the search icon.
But be aware: You can‘t mix text and tokens at various positions.
From the docs:
Tokens always occur contiguously before any text in the search field.
Adding this here for reference:
Feel free to check out TaggerKit (a library I made), it's more or less what OP was talking about. You can basically add tags functionality to your app by just adding a view and a couple of properties.
I dont think you can do it with any built in functionality in the SDK, never seen such a feature. What you could do however is implement it yourself, have some custom blue button with some text over it, and when the user hits return you can have some code that takes the text and returns you the button that you need, shouldnt be too bad to implement
I'm new with the objective-c programming, but so far i manage to do a custom splitview which parse an rss link of news list in tableview on the rootview. When the link selected it will open the url in detailed view.The problem is i can only show the full html in uiwebview. What i want is that the detail view to display only text and the image (just like the BBC-News app), I tried the stringWithContentsOfURL and stripped the html tag, but it display the whole string from head to footer. I just wanted the body content. Is there anyway i can achieve that? Thanks in advance.
If you use the XMLParser then you should apply didStartElement method use this method and make a check for what ever part you want with simple syntax
if([elementName isEqualToString:#"body"])
use this type of if/else check to refine what ever that you want and save in an array according to your data Class then when you retrive data at the time of detail view use this array and tie with particular data whatever you want to show in your details view.
Like:-
label.text = array.title;
Hope this will help you...
I have an rss feed with only one item in it.I am trying to go straight to showing its details without having to go through a table view to do it.
I have a different rss feed working in my app that has multiple items. I have this working with a table view.I was looking online and all I could find was how to display a feed through a table view.
Does anyone know how to display the singular item from the feed in an app?
or of any online tutorials?
Any and all help much appreciated.
Just parse the feed and insted of showing in tableview ,show it in a label or textview .
I don't understand what u trying to ask through your question. It sounds simple but can you elaborate or give url of Rss feed links for understaning ur query...
If you've parsed your data already, you have it stored in a set of variables, right?
So now you just want a particular data to display in detail view for this if you use (UIWebView for DetailView) used this or a particular you wish to publish in the details view:-
– loadHTMLString:baseURL:
Sets the main page content and base URL.
- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
Parameters
string
The content for the main page.
baseURL
The base URL for the content.
k...
i got an rss feed app. All is working ok apart from the fact that in my "description" textView
(detail of the rss) the text appears in html!
any ideas in what is going on?
thanks!
i have found the solution using a wbview with loadHTMLString.
however i would like to ask what is the difference between these two rss feeds:
http://newsrss.bbc.co.uk/rss/sportonline_world_edition/front_page/rss.xml
and this for example:
http://feeds.feedburner.com/pitsirikos/uPfN
in the first one i can get the textview to display the contents as they should appear while in the second one i get html code in the textview!
my code remains the same in both cases...
The key difference between them is that the latter contains prefix tags
e.g. and
Do you use NSXMLParser or libxml2 ? are you doing a strcmp with the element name ?
I am new to iPhone development. I am parsing a URL and displayed its content in the table. On clicking a row it plays a video. When I click a done button, I once again call the tableview.
When I call the table view it parses the URL once again to display the contents. I want to limit the parsing for 1 time and for the next time I want to display the contents which are parsed at the first time. How can I achieve it?
Not to sound condescending, but, don't do that? When the results are first requested, parse them and store the parsed results. From there on out, only return those.
Without more information about your problem, it seems that trivial.