How to refresh a window in appcelerator? - ios

I am developing a ios mobile app.In that mobile app I am showing the gallery. I created gallery in grid format with the help of JSON data.and also i provide a edit icon on that all images and video's of the gallery.if user click on edit icon the image is to be deleted.after that remaining images and video only show in grid format.so to get the non deleted images and videos in grid format we need to refresh the window. so can any one tell me how to refresh the current window in appcelerator ?

This would be an excellent case for Alloy's data binding:
http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Data_Binding
If you're not using Alloy or for some reason do not want to use Collections to store your JSON data, then you will need to wrap the code where you render the icons in a function. When something changes/deletes you will have to call this function which should start with calling removeAllChildren() on the parent view which it will add the icons to.

Related

How to show my app in `open in` menu of other apps for `pdf` file based of selected pdf file size in swift 3

I want to show my app in open in menu of other apps(ex: mail app, dropbox, etc) for open in action, I have implemented for importing pdf files from other apps everything is working fine. But my question is how can I addsize restriction for selected pdf file like photos app.
For example: My app should show in open in menu only if selected pdf file size is less than 5mb.
In photos apps when selecting 6 images it shows many apps in open in menu list. Show below image
But when selecting 51 images it shows only 3 apps in open in menu. Show below image
I think in photos app the apps are filtering based on selected photos total size. I want these type of functionality in my app. Any suggestion? Thanks in advance.

Menu is not showing pdf file- pdf Annotation in iOS

I am developing the app like ibooks by reference,in that the pdf is not enabling the menu i.e while I long tap the pdf it not showing Menu like copy , define.
How can I work in menu? Help me.
The linked solution simply does not implement text selection or glyph coordinate extraction/conversion. You need to parse the PDF page content stream and track glyphs on the page. CGPDFOperatorTable can be a starting point, however I suggest reading the PDF spec and getting familiar with the multiple transformation matrix states that a page can have - it's quite tricky to get right. You also need to embed various CMaps (character maps) so that all fonts can be correctly parsed. It took me more than a year to get a reliable text extraction for >99% of all PDF documents. If you want to save this time, you can check out the commercial PDF SDK I am working - google for PSPDFKit. We support iOS and Android.

Pdf / Docx preview in a Phonegap app on iOS

I need to open Pdf / Docx documents for preview from a Phonegap app.
On Android it's possible to open files in extenal apps using WebIntent plugin.
Now what about iOS? It seems possible to do this entirely with the build-in browser (which surprisingly does render docx) by creating a html page with a header and a back button in the top and an iframe taking up the rest of the screen.
It would be great if the user could zoom and drag the document while the header would remain stationary, but I couldn't get to zoom working at all inside the iframe.
Any suggestions?
I ended up using InAppBrowser Plugin with enableViewportScale=yes. It displays a toolbar with a back button with custom caption. It would be better if I can add my own toolbar, so the navigation is consistent in the whole app, but this is good enough.

Drag and Drop Across Windows

I have a page that loads and then that page's JavaScript opens a popup window that will become a gallery. The user will upload images, using JavaScript and PHP that is part of the popup gallery window, and these uploaded images will be displayed in the gallery window that we popped up
Once several images have been uploaded and displayed in the gallery window I would like to drag and drop them into the primary window. Actually I'd like to leave the image in the gallery and just drag a ghost image across and drop it in the main window, so we end with the image in both windows.
This seems a bit tricky since the main widow and the popup gallery window are different JavaScript execution contexts. How can I implement a jQuery (or YUI) Drag and Drop that works from the popup window to the main window?
Thanks for any ideas.
Maybe this plugin can help you:
http://dragsort.codeplex.com/

Saving state of web page in HTML5 / Phonegap

I've just started making an iPad app using Phonegap.
On one of my pages I access the camera, take a picture, display that picture on the page and then have a number of customisable options (resizing, positioning of other elements that can be dragged on top of the image etc)
Once you click on a different link (tab bar item) however, all of this information is lost and you have to start over once you go back to the photo page. Is there a way to capture the web page in it's current state, or even grab each elements information (position on page, last photo taken etc) individually so that when the user goes back to the next screen, everything loads as it were when the user left the screen.
Hope this makes sense and someone can help! Thanks in advance!
I'm just a beginner Phonegap developer myself, but I believe you probably want to look into localStorage. http://docs.phonegap.com/en/1.2.0/phonegap_storage_storage.md.html#localStorage
You'll need to use JavaScript (and perhaps a library like jQuery) to get various data about the page's current state. Once you know them, you should be able to to store them for retrieval in subsequent sessions later via localStorage.
I hope this helps.

Resources