UITabBar in iOS 7 -- touch issues - uitabbarcontroller

I'm having a weird occurance with my app in iOS 7 (using the GM build).
I have four tabs, and I have a customized tab bar, with background, icons, etc. I have my code below for setting up tab bar properly:
[[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:#"tab_bar.png"]];
[[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:#"tab_selected.png"]];
[[UITabBarItem appearance] setTitleTextAttributes:#{UITextAttributeTextColor: [UIColor whiteColor]} forState:UIControlStateHighlighted];
[[UITabBarItem appearance] setTitleTextAttributes:#{UITextAttributeTextColor: [UIColor whiteColor]} forState:UIControlStateNormal];
I have four tabs, and when the user selects any of the last three tabs, everything works fine. But when the user tries to go back to the first tab, the tab switches, but the selection doesn't switch. It still shows previous tab was selected. If they tap again, then it switches. Is there any other change for iOS 7 I should be aware of? It appears iOS 7 is losing track of touches here and there and I was not able to find anything else.

I got that too and am pretty sure it's a bug in ios 7

Related

Why does SwiftUI code run/reloae on iPhone and not on iPad?

I have been looking at this code and other similar code for the last week and have a question.
The app (code link below) is a simple 5 question app in SwiftUI. Using an iPhone 11 simulator, the quiz runs perfectly and when you hit the back nav link and press the Start Quiz button, the quiz runs again. On an iPad however the Start Quiz button does not work to relaunch the Quiz.
I figured since both are running the same IOS, they should both function the same but they do not. Tried it on my physical iPad and the same thing. Runs through the quiz once, and will not run a second time. Anybody have any idea why? Thanks for your help!
https://github.com/albypanz94/Quiz-Game-in-SwiftUI.git
The issue is that the SwiftUI Navigation model is, by default, based on a UISplitview, and that on the iPad, the "Start Quiz" navigation link transfers navigation to its second controller. On an iphone, the second controller is collapsed away.
What this means for the game is that for the iPad (and large iPhones in landscape mode), the game cannot re-start.
You would also find anomalies if you ran the game on a large format iPhone, and then rotated it mid way through the game.
You can change the navigation view style to not use the split view model by using:
.navigationViewStyle(StackNavigationViewStyle())
after the NavigationView closing brace.

Qt - QTreeView starts behaving strangely over time of running the application

I have a weird problem.
After the application starts, everything works normally.
However after some time, QTreeViews in my application start behaving weird. The selection is no longer system-blue. Instead, it looks like
click to see pictures 1), 2), 3)
I.e, there's a slight dim over the icon and dotted lines to the left and to the right, as on picture 1). The "expand" triangle in Windows 8.1 turns into a +/- button, as on picture 2). And when i hover mouse over this expand button, I am getting an empty white square instead of a "highlighted expansion triangle", as on picture 3).
Normally, the selection and the expansion triangle should look like this (which it does after the application start) as shown on picture 1) below
click to see pictures 1), 2)
And the mouse hovered expansion triangle should look like on picture 2) (which it does after app start).
The application is launched with administrator privileges on Windows 8.1.
Interestingly the QtCreator 4.0.0 for Qt 5.6.0 (which I am using) sometimes starts having the same problem in its file tree view (where the project files are listed). I run it with administrator privileges as well (because I need to debug my app that requires admin privileges).
What can be causing this?
I think this is a known bug and that it is fixed in Qt5.6.1 release. See here for details of the bug - it looks like what you are seeing (or very similar).
So try to updating to Qt5.6.1 and see if this resolves it.

Can a QT window be completely styled, including the menu bar when running on Windows 7 or Vista?

I noticed that the sample apps from QT show their menu bar as opaque, and with a color that doesn't match any of the styling on the window. It seems as if the windows being created by QT when running on Vista or Windows 7 don't pick up the translucency that are no the mainstay of the new Windows look and feel. Is there a way to override this in QT, or even have a custom painted menu?
On Windows 7 there is a special flag that activates the "Glass" Look&Feel:
Here is some more detailed information:
http://labs.trolltech.com/blogs/2009/09/15/using-blur-behind-on-windows/
Screenshot http://labs.trolltech.com/blogs/wp-content/uploads/2009/09/blurbehind2.png
From what I see, only the Qt::WA_TranslucentBackground flag is involved.
All of my Qt applications look native on Vista/Win7, including the "glass" frame. This is all by default.
I must admit I don't know where you got this idea that they don't. Here's what the Browser demo that comes with Qt looks like on my Win7 machine.
alt text http://img28.imageshack.us/img28/5535/qtacrossplatformapplica.png
I can't see anything wrong with it.

Simulating mouse clicks on Mac OS X does not work for some applications

I'm writing an application for Mac OS X 10.6 and later in C++. One part of the application needs to simulate mouse movement and mouse clicks. I do this currently by posting CGEvent objects using CGEventPost(kCGHIDEventTap, event);.
This works, for the most part - I can simulate mouse movement and clicks just fine, but it seems to fail in some areas. For example:
In Mozilla Firefox and Safari, I can click on all the menus, but cannot click on a link within a website. When I try, the link is highlighted, but the browser never follows the link. However, I can right-click on a link, select "open link in new tab", and everything works as expected. Solved - creating the mouse event using CGEventCreateMouseEvent(...) makes the event work within web browser.
I can click on the "Dashboard" icon to brink up the dashboard, but I cannot click on the "i" button on any of the dashboard widgets. Similarly, clicking on any of the search results from the spotlight search widget doesn't work either.
This inconsistency is along application boundaries. What might be the cause?
What you need to do to convince these applications that you have in fact generated a click is to explicitly set the value of the "click state" field on the mouse up event to 1 (it defaults to 0). The following code will do it:
CGEventSetIntegerValueField(event, kCGMouseEventClickState, 1);
It also has to be set to 1 for the mouse down, but by using CGEventCreateMouseEvent() rather than CGEventCreate() that gets done for you.
I have tested this and it works in the 'i' buttons in the dashboard and the Spotlight search results.
(As an aside, if you were simulating a double click you would need to set the click state to 2 for both the mouse down and mouse up events of the second click.)
Most menus are activated with the mouseDown event. Hyperlinks are followed after the mouseUp event. The "i" button only works when the mouse has been clicked but not a long time.
All this seem to show that you have a timing problem, try several pressed timing.
Use OSXVnc. I see they use CGPostMouseEvent() instead of CGPostEvent().
I have written how to do it in the blog post Python Mouse Click and Move Mouse on Apple Mac OS X Snow Leopard 10.6.x.

Having trouble enabling vertical scrolling in edit box

I'm using Visual Studio 2005 and programming a dialog-based MFC application in C++.
I have an edit box and I'm trying to make it auto-scroll.
When I make auto vscroll true, it still won't auto-scroll when I have too many lines in my edit box.
Any ideas in what could be wrong? Is there maybe some code line I have to add to my edit box?
What do you mean by "Auto-Scroll"?
Turning on auto vscroll enables the ES_AUTOVSCROLL edit control style which:
ES_AUTOVSCROLL -
Automatically scrolls text up one page when the user presses the ENTER key on the last line.
This may not be what you think "Auto-Scroll" means. A common misconception is that auto vscroll will automatically turn on/off the vertical scroll bar as more text is typed into the edit control. This is not the case, you have to either always have the scroll bar displayed or you have to come up with your own code to turn on and off the scroll bar yourself.