Since updating to iOS, I've noticed UITableView.appearance().sectionFooterHeight = 0 no longer works in my app (or in Xcode 14), screenshots attatched for reference, and here's how I was using it:
init() {
UITableView.appearance().sectionFooterHeight = 0
}
Before iOS16
After iOS16
If something has changed, what's the updated version of this?
Related
I am building an app with AVKit and MediaPlayer and want to show a cover in the control center. Using this code didn't worked for me:
if let image = UIImage(named: "myCover") {
nowPlayingInfo[MPMediaItemPropertyArtwork] = MPMediaItemArtwork(boundsSize: image.size) { size in
return image
}
}
First, I thought that downloading the UI Image failed, but then i realised that this issue also happend when using a locally saved image.
By the way: Setting up the player (pause/play/background mode) worked fine.
I am using iOS 16 and Xcode 14.0.1.
where is your nowPlayingInfo coming from ?
In my process I declare a new dictionary with titles and stuff
then I process my image later with async download using
MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPMediaItemPropertyArtwork] = artwork
I mean if you directly set it in the default Center is it still not showing ?
As coldfusion is upgraded for my current application. The earlier code for extjs isn't working anymore
Could you suggest the latest version for the below implementations?
var grid = ColdFusion.Grid.getGridObject('mainGrid');
grid.getBottomToolbar().hide();
this doesnt hide the default toolbar that appears with cfgrid. Tried adding a xtype: 'pagingtoolbar', to the grid and renderTo :grid.bbar , where grid.bbar is null in the newest version.
Also
e.grid.colModel.config[e.column].editor.selectOnFocus = true;
while adding a listener function the above code isn't working
Also
grid.syncSize();//Sync to size up everything properly again
what shall be used instead here?
I'm migrating a Qt for iOS project to Qt 5.5. In iOS 5.1.1 at least, the app fails to start if you launch it with the device face up. An assertion displays an error in qiosscreen.mm at line 344. Here's the Qt source code function that is failing:
Qt::ScreenOrientation QIOSScreen::orientation() const
{
// Auxiliary screens are always the same orientation as their primary orientation
if (m_uiScreen != [UIScreen mainScreen])
return Qt::PrimaryOrientation;
UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
// At startup, iOS will report an unknown orientation for the device, even
// if we've asked it to begin generating device orientation notifications.
// In this case we fall back to the status bar orientation, which reflects
// the orientation the application was started up in (which may not match
// the physical orientation of the device, but typically does unless the
// application has been locked to a subset of the available orientations).
if (deviceOrientation == UIDeviceOrientationUnknown)
deviceOrientation = UIDeviceOrientation([UIApplication sharedApplication].statusBarOrientation);
// If the device reports face up or face down orientations, we can't map
// them to Qt orientations, so we pretend we're in the same orientation
// as before.
if (deviceOrientation == UIDeviceOrientationFaceUp || deviceOrientation == UIDeviceOrientationFaceDown) {
Q_ASSERT(screen());
return screen()->orientation();
}
return toQtScreenOrientation(deviceOrientation);
}
It displays an assertion at
Q_ASSERT(screen());
screen() must be returning 0, so screen()->orientation() is attempting to deference a null pointer. That screen() function is defined in the parent class, QPlatformScreen:
QScreen *QPlatformScreen::screen() const
{
Q_D(const QPlatformScreen);
return d->screen;
}
The constructor for that class initializes d->screen to 0:
QPlatformScreen::QPlatformScreen()
: d_ptr(new QPlatformScreenPrivate)
{
Q_D(QPlatformScreen);
d->screen = 0;
}
From the comments, I infer that d->screen is set at some point when the orientation is portrait or landscape, and then they fall back to that when it becomes face up / down. Since it is starting as face up, there is no prior good value to fall back to.
Has anyone else encountered this, or have a solution? Btw, I am not building from qt source and do not want to, so changing their code is not a solution for me if I can possibly avoid that.
I found that this only seems to be occurring when I launch the app from XCode or QtCreator. If I launch the app on the device the way it normally runs, this bug seems to be averted.
I'm having a problem trying to disable Firefox extensions programmatically. Right now, I'm modifying the extension.json file , changing the 2 parameters , active and userDisabled , but without any success. Despite the fact that in the extension menu it appears to be disabled , the icon of extensions still appear in the toolbar and I can see that the extensions still work. Is there a way to make this work using C++ ?
That won't work you have to use AddonManager.jsm to change the property like this:
Cu.import('resource://gre/modules/AddonManager.jsm');
AddonManager.getAddonByID('Profilist#jetpack', function(addon) { //id of the addon
console.info('addon:', addon);
addon.userDisabled = false; //set to true to enable it
});
I am using a selfmade QSortFilterProxyModel to do the filtering and sorting of a model in my application.
Here is the filterAcceptsRow function:
//---------------------------------------------------------------------------------
bool
SkillSortFilterProxyModel::filterAcceptsRow(int p_row, const QModelIndex& p_parent) const
{
QModelIndex currentIndex = sourceModel()->index(p_row, 0, p_parent);
SkillModelItem* currentItem = (SkillModelItem*)currentIndex.internalPointer();
// Check the item
bool accept = filterAcceptsItem(currentItem);
// We may hide a category if it is empty
if (accept && currentItem->isCategory && !_showEmptyCategories)
{
// Iterate over the children to find out if any will be accepted
// And if so, accept the category
int numChildren = currentItem->children.size();
accept = false;
for (int i = 0; i < numChildren; ++i)
{
SkillModelItem* item = currentItem->children[i];
if (filterAcceptsItem(item))
{
accept = true;
break;
}
}
}
// Return result
return accept;
}
Here is what it is supposed to do: I think the exact nature of the SkillModelItem is not important here, but you should understand that the same model item class is used for skill categories and skills themselves. The filterAcceptsRow function calls filterAcceptsItem to see if the particular item should be shown or not. That works well.
However, if the item is a category, its children should also be checked to see if it has any accepted children, and if so, the category should be shown.
Should work in theory, but what happens in practice is that after currentItem->children.size() is called, the currentItem->children (which is a std::vector) becomes invalid! It returns the correct size, but if I call it again, the size is now some random number. And accessing the child items in the for loop after crashes the application.
I have no idea what is going on here. The application is not threaded (at least I do not use any threads). I am using Qt Creator on Windows, using MinGW as the compiler. I also tried using MSVC but that will not even compile as it claims it cannot find any header files (which MinGW can find without problems). Also tried recompiling, re-running qmake, etc. All to no avail.
Any ideas what could be the problem here?
If it helps, you can look at the sources here: GitHub repo
Turns out this is a debugger problem.
If I do not step through at runtime, the function works just fine.
Seems like there is a bug in either Qt Creator or the MinGW version coming with it.