How to make the blue bar on the top disappear for tttableview with list datasource (program running on ios 5 beta) - three20

There is a blue bar appearing on the top of my tttableview when the program is running on ios 5 beta, it was not there if I run the program on ios 4.3.
The table is configured to use a list datasource.
Does anyone know what the problem could be? Is it the tableview api changed in someway for ios 5?
Thanks.

It is caused by a subtle but important change Apple made in the UITableView behavior for section headers and footers. If you implement the tableView:viewForHeaderInSection: or tableView:viewForFooterInSection: delegate methods then you MUST now also implement the tableView:heightForHeaderInSection: and tableView:heightForFooterInSection: delegate methods.
The extra blank section header you are seeing is caused by returning 'nil' from the '...viewFor...' methods but not returning 0 from the '...heightFor...' methods.

Pull down the latest code from Three20 git repository on github. They have corrected this issue with tttableview.
See this page https://github.com/facebook/three20/issues/643

Related

Interface Builder is not working as expected after updating Xcode to 11.2.1 (11B53)

There are empty spaces on top of the View Controller. The UI was correct before updating to the latest Xcode Version. After updating to the latest version i got this behaviour. Some of the View Controller was correct updated butnot all. Check the Image to understand my problem (The View controller on the right side has an empty gray space.
If you compile it you see the same behaviour on the simulator (on all devices).
Looks like a second application in the background when you start the app.
I hope someone can help me.
Thanks!
you should config your ViewController when presenting like that:
yourViewController.modalPresentationStyle = UIModalPresentationFullScreen;
[self yourViewController animated:YES completion:NULL];
Try to set, parent ViewController's (Edit MemberVC, I assume) Top Bar property to None.

Cocoa app not loading views or running code on High Sierra

I have an app on the Mac AppStore and many users have recently written to say it doesn't work on High Sierra (possibly 10.13.6, its hard to extract specific information from them). I managed to reproduce the issue on a friend's device, however I won't be able to use the device to build with Xcode etc.
The issue seems to be the NSViewController doesn't load it's subviews at all! The grey view controller shown below should have dropdowns and buttons in it.
I also noticed that closing the grey window doesn't close the red transparent window - on Mojave the code to do this runs as expected. A custom shortcut/menu item in the status bar also doesn't appear to run the code it's bound to. Note that the red window is presented via code from the grey window, so some code is managing to run.
This vague thread seems to mention the same issue, as does this question. Neither of them are asking for a programmatic solution however.
Does anyone know how to fix this, or do I need to tell my users to update their OS?
Edit: managed to compile on High Sierra and the views still aren't appearing (nor is there any sign of them in the view debugger). The console says:
2019-02-02 16:53:41.602178+1100 Translate This[20410:36446120] -[NSMenu setItemArray:]: unrecognized selector sent to instance 0x604000069180
2019-02-02 16:53:41.602366+1100 Translate This[20410:36446120] Failed to set (contentViewController) user defined inspected property on (NSWindow): -[NSMenu setItemArray:]: unrecognized selector sent to instance 0x604000069180
2019-02-02 16:54:57.678247+1100 Translate This[20410:36446120] -[NSStoryboard _bundle]: unrecognized selector sent to instance 0x600000000660
2019-02-02 16:54:57.728849+1100 Translate This[20410:36446120] -[NSStoryboard _bundle]: unrecognized selector sent to instance 0x600000000660
0x604000069180 is an NSMenu. I'm not explicitly doing either of the things described in the console output in my code.
I was having the same error with a simple menu bar app built on macOS 10.14 but failing when running on earlier OS versions:
[NSMenu setItemArray:]: unrecognized selector sent to instance
When looking at the header file for NSMenu I see:
/* Returns an array containing the receiver's menu items.
This property is settable in macOS 10.14 and later. */
open var items: [NSMenuItem]
So you can't set menu.items = someItemsArray but rather use the other apis (menu.addItem(item), menu.removeAllItems(), etc) to fix the issue.
This appears to be an oversight by Apple in Xcode 10 by failing to warn you that it's not settable based on your app's deployment target.
https://openradar.appspot.com/45517851
gdub's answer was correct in my case!
Note, however, that for me the issue was not caused by the main NSMenu of the window (which was indeed set by using a storyboard), but we had a popup button (NSPopupButton) which does use a NSMenu inside too, and which we did initialize with items = [...] rather than by calling addItem() in a loop. It was just not obvious cause it was in an inner custom NSView, so it took me hours to dig it down.
I agree that the root issue is Xcode not telling that you need if #available 10.14 for setting items, but for a workaround, please just check your code to see if you set NSMenu.items yourself somewhere, and turn it into a loop with addItem. You did mention you have popup buttons (just like us), so I hope you will be able to fix it and your app to work again on 10.13 too.

Xcode StoryBoard views are disappeared after shutdown

I have placed a few labels and image views inside a prototype cell of a tableview and added constraints.I have saved everything and shutdown my iMac and later I started working again but all the views & constraints in prototype cell are misplaced and I can't see them inside of the cell anymore but I can still see the objects listed I have added in Navigator window. I have faced the same issue earlier as well but then I thought maybe I forgot to save it or did something wrong. The issue raised again and I am using Xcode version 8.0. Please let me know any possible fixes for it or if I am doing wrong anywhere to have this issue.

Strange bug in cocos2d-x

I have found one bug that causes the cocos2d view to stop rendering its contents. The bug can be reproduced using the example project found in Jpsarda's post about integration between UIKit and cocos2d-x.
The link to the website is: http://jpsarda.tumblr.com/post/24983791554/mixing-cocos2d-x-uikit and the link to the project is: http://dl.dropbox.com/u/12856650/Cocos2dxOnUikit.zip.
To reproduce the bug it is sufficient to trigger several times between uikit views and cocos2d views by pressing repeatedly the "Cocos2d-x GO!" button on the first view followed by the "Close" button on the second view. I have also done a video that shows how to reproduce the bug: http://youtu.be/EIvf-Ao6u5I. The bug occurs only on a real device and not on the simulator. Because of this bug it is pretty difficult to create applications that allow the user to switch frequently between cocos2d views and uikit views such the one on which I am working. For the moment I can't understand the root cause and I haven't received a reply on the forum yet. Is there anyone that have an idea/intution/suggestion about the possible cause?
I found the reason. EAGLView is never released and this causes a leak of resources. To resolve the bug in JPSARDA's example it is sufficient to add the following line:
[[EAGLView sharedEGLView] release];
at the end of CCEGELView::release method. This will solve JPSARDA's ( and my application :D ) issues but it is likely that this solution won't work in projects that handle EAGLView's lifecycle in a different way

Autolayout warning in Mac OS X

I am getting a warning I do not fully understand every time I run my app:
Layout still needs update after calling -[WebHTMLView layout]. WebHTMLView or one of its superclasses may have overridden -layout without calling super. Or, something may have dirtied layout in the middle of updating it. Both are programming errors in Cocoa Autolayout. The former is pretty likely to arise if some pre-Cocoa Autolayout class had a method called layout, but it should be fixed.
(I've seen this related question, yet the answer provided solves some other issue, thus my question.) The warning appears as soon as I add a web view to my app. What does it mean, and how should I fix the issue?
It appears that - (void)layout is implemented in WebHTMLView. The source for WebKit is available on Apple's open source page to review.
http://www.opensource.apple.com/source/WebKit/WebKit-7534.53.11/mac/WebView/WebHTMLView.mm
In the Auto Layout documentation, it states that you only need to implement "layout" if you need custom logic to layout subviews while using Auto Layout. It goes on to say that you should always call [super layout] in your custom implementation. That is not happening with WebHTMLView.
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html%23//apple_ref/occ/instm/NSView/layout
This message can probably be safely ignored for your project. The same thing happens for me on a blank new project.
Besides the noted NSTableView with dragging I found out that if you open the NSFontManager this will always show this message. Not only with Swift but also with Apple's own demo program CoreTextArcCocoa. So it's definitely some bug in Apple's guts.

Resources