Titanium Mobile - Create an iPad Popover in NavBar - ipad

I am currently playing around with Titanium Mobile and trying to create and populate a popover when a button in the NavBar (at the top) is clicked. Currently, the popover is created, but it's not populated with any data. (I'm trying to populate it with a view from my file "category_list.js").
Here's what I have tried so far: http://pastie.org/2145045
The problem is: The popover shows up, but it's not being populated with any data.
UPDATE: More specifically, after looking around, I guess what I am trying to do is create a navigation group within a popover. Apparently, this forum post says it's possible.
But I can't seem to figure it out. If anyone can provide a concrete example of how a navigation group works within the context of a popover using Appcelerator, it would help me out tremendously.
Any help would be greatly appreciated! Thanks.

http://blog.clearlyinnovative.com/post/7182213033/titanium-appcelerator-quickie-ipad-popover-with

I wonder if if has anything to do with popover.add(categories_list); being called once at line 18 and once in the click event at line 73. When I've worked with popovers in the past you only need to add to it once. Let me know if this gets you anywhere closer to a solution?
The other problem I see that I'm 99% sure is causing this issue is the popovers don't adjust auto to the child view height and width. Try adding height: 300, width: 250 when creating the popover.

Related

How to properly show a popover?

So I've linked one button (the one which represent a trash, in blue) with a second scene on my project as shown in the following link: https://gyazo.com/52f140f12cd5d80dd7e4ea191e8daa5f
My problem:
I don't know why, but my popover does not fully appear, see this picture:
My question:
Knowing that i'm actually working with the interface builder, how can i manage this popover so it will be fully displayed (it actual size are normally set as 500*500)?
Or do I have to do it programmatically? If yes, can someone give me a hint?
Thanks in advance!

UIDatePicker not displaying correctly

Basically this issue started when I updated my app to run with iOS 9. Without making any change in the code now a white square appears over the picker view, but it works normally.
Note that the user can hide and show the picker views and the cells they're in. If you need more info leave a comment.
UPDATE: Here is the full screenshot of the Table View:
UPDATE 2: The following shows when I preview (press bar space button) the _pickerView property in the variables debugger. This makes me think the strange view is inside the UIDatePickerView and that it's a bug.
UPDATE 3: Extensive Research
So I finally did more research using the view inspector and the debugger and I got to some conclusion, although I still don't know how to solve it.
Using the view hierarchy debugger I found out the the white strange view it's a UIPickerTableView inside the UIDatePicker.
Here we can see the subject selected in blue and it's name at the top of the screen. I also wrote the whole hierarchy from the picker view to the subject so you can see it.
Next step was inspecting my datePicker var with the debugger to see if I could get to that UIPickerTableView causing problems. Inside it I could find 3 views, each one corresponding to each component (day, month, year). Let me show you the quick look of each one of these:
Click the pics to enlarge
In the first and the third one (day and year) we can see what look like some misplaced views next to the actual labels with the numbers. These properties, as you can see in the screenshot, are UIPickerColumnViews. I didn't go any further but you can imagine that if we inspect that property we would find the subject as a UIPickerTableView.
After all that I got to the conclusion that the misplacement of those views is what might be causing the issue. And that's all for today.
FINAL UPDATE
So some days after filing the bug report Apple answered and marked it as a duplicate. So I guess we just have to wait they fix it. You can check the radar at rdar://22566989
Apple Developer Relations marked my bug report as a duplicate, so I guess it is an SDK bug that they'll have to solve. It is still open by the time of this post (12 Oct).
Workaround
In the viewDidLoad() method change a property of the date picker, for example the mode. You don't have to leave it changed, you can set it to anything and then change it back to what you actually want.
Here's the hack that worked for me: If you change the UITableView separator style to None the problem goes away. Seems like a bug on Apple's end, like the numerous problems we are finding in iOS 9.9
I had the same issue, i discover that happened because my UIDatePicker was separate from view of my view controller. I added this view as a sub view in code. To solve this problem, i add the UIDatePicker in viewDidLoad method, this is helped me

Sliding drawer equivalent in iOS

After wasting lot of time searching, I am finally posting this question, hoping I get an answer.
I want to have a widget in iOS, which has the similar functionality of Sliding Drawer in Android. (Like the bar at the bottom, and on pulling it, it shows up a new view).
Any help would be greatly appreciated.
Thanks
A few similar questions that might help you out:
Making a pull out tray - (iOS)
iOS: Sliding UIView on/off screen
I recently made a drawer container controller and put it up on Github:
https://github.com/saldavonschwartz/DrawerContainerController
While not exactly the same (you are asking about a vertical single view sliding up/down), you might want to download the code and take a look. My approach might as well work for what you are trying to do: basically, creating a container controller which can host another controller and its view and present its view in a custom way.
Specifically, you might want to look at:
-replaceContainedController:forIdentifier: for how you would go about adding child view controllers the 'Apple' way.
-didPanContent: and -translateContentContainerViewToPosition:animated:completion: for the sliding animation from input of a UIPanGestureRecognizer

Trying to mimic the Apple iPad popover style

My sincere apologies if this question has been asked, but I really couldn't find it.
Essentially, I am trying to mimic the look of the popovers used by the built-in Apple applications. In particular, not the popovers that use a tableview list, but rather those popovers that only have buttons inside.
For example, in the Mail app, clicking the left-facing arrow on the top right of the screen, a popover is shown with four buttons: Reply, Reply All, Forward, Print.
How is this particular popup created to give that look?
I have tried making my own UIViewController with a black background and Round Rect Buttons, but it doesn't look the same. Any help would be much appreciated!
Thank you.
It's a UIActionSheet. On iPad, it gets a "popover" appearance if it's not presented from within another popover.

UIDatePicker in PopoverView in iPad

I have an iPad specific application running iOS 3.2.2 which displays a settings view in a ui popover. This all renders great, but now I'm trying to get a date picker to render inside the view and not sure what the best approach is for displaying it.
Right now it has a button which toggles visibility of the date picker within the modal, but that seems very clumsy for managing dismissal compared to the normal approach of an action sheet.
I haven't been able to find a 'best practice' for this situation and was wondering if anyone's run into this before and could offer some suggestions or guidance.
Thanks!
pls check the solution provided in the link .. might help you .
1. Create the UIDatePicker programmatically (don’t use the IB)
2. add it to the view after the popup is shown
http://omegadelta.net/2010/06/04/ipad-simulator-crashes-if-a-uidatepicker-is-in-a-uipopovercontroller/
Note the answer here indicating that the UIPickerView must be the root view of your controller when presented in a popover. It sounds like you may be attempting to place the date picker as one of several views inside the popover. If so, you'll encounter the problem described here.
trying to fix this error: Could not find mapped image UIPickerViewFrameLeft-162-Popover.png

Resources