three20 p31 syntax error with UIAccessibilityTraits - iphone

i downlaoded three20 p31. when i tried to build i got errors in following places
- (UIAccessibilityTraits) accessibilityTraits {
return [super accessibilityTraits] | UIAccessibilityTraitStaticText;
}
the same function is used in 3 classes. TTbutton.m,TTLabel.m,TTstyledTestlabel.m
. i simply commented all funnctions containing UIAccessibilityTraits.Then my syantax errors got removed. i found out that in my UIkit framework there is no UIAccessibility.h file. is it my sdk problem ? Why UIAccessibility not included in my UIkit ?

What version of the iPhone SDK do you use and what version do you compile for? The accessibility traits were added in 3.0.

Related

Identifier expected.ts(1003) with Alpinejs and Astro

I'm using Aplinejs (3.11.1) with Astro.build (2.0.13) and have the following on a div
x-on:click.outside="shownav = false"
I'm getting the following error in VS Code (1.74.3) on the "."
Identifier expected.ts(1003)
I'm new to VS Code, Alpine and Astro, so I'm not sure how to get rid of this error. Can someone advise? I'm using TypeScript 4.9.5.
Separate but related, for anyone getting the following error on "outside":
Property 'outside' does not exist on type 'HTMLAttributes'.ts(2322)
I sorted that by adding this to src/custom-attributes.d.ts
declare namespace astroHTML.JSX {
interface HTMLAttributes {
outside?: string;
}}
Version of the Astro VS Code extension lower than 0.29.0 don't support Alpine correctly. (See this issue)
At the time of writing, 0.29.0 is only available in Pre-release. You can update to it by pressing the Switch to Pre-Release button on the extension page.
Screenshot of the extension page

How to read html files on Vapor with Leaf when not using the tau version?

There was a version of Leaf that I was using to load .html files instead of .leaf ones from my Vapor project, which would make syntax coloring for those same files done automatically.
The version of Leaf was 4.0.0-tau.1 and the one for LeafKit was 1.0.0-tau.1.1
When using this particular version, I could setup leaf in the configure.swift file this way:
/// Change the classic .leaf extension to .html for the syntax
/// coloring option of Xcode to work each time the app is being load up.
fileprivate func leaf(_ app: Application) {
if !app.environment.isRelease {
LeafRenderer.Option.caching = .bypass // Another issue from the update
}
let detected = LeafEngine.rootDirectory ?? app.directory.viewsDirectory
LeafEngine.rootDirectory = detected
LeafEngine.sources = .singleSource(
NIOLeafFiles(fileio: app.fileio,
limits: .default,
sandboxDirectory: detected,
viewDirectory: detected,
defaultExtension: "html"))
app.views.use(.leaf)
}
In this code, the LeafRenderer.Option.caching = .bypass and the code used with LeafEngine do not work anymore since having updated Leaf to 4.1.3 and LeafKit to 1.3.1.
How can I successfully make this code work as before with the updated Leaf and LeafKit frameworks?
You can use this Xcode plugin:
https://github.com/OmranK/VaporLeafPlugIn
It adds Vapor Leaf language support to Xcode IDE. Provides syntax highlighting for Leaf tags as well as HTML tags with auto-indentation all together.
At the moment the plugin supports Xcode up to 13.2 beta. Future Xcode versions will require small update (add new DVTPlugInCompatibilityUUID) but it can be easily handled even on already installed plugin.

How to get DPI device to PCL in Xamarin. Forms? - Followup

Using Xamarin Forms Visual Studio 2019.
I need to get the DPI of the device.
This post has a solution:
How to get DPI device to PCL in Xamarin. Forms?
Implementing the solution gave problems:
When applying the answer above I get this error message:
The type or namespace name 'DependencyAttribute' could not be found
(are you missing a using directive or an assembly reference?)
In your android implementation, add a new class:
[assembly: Dependency(typeof(DisplayInfo))]
namespace .....
--I solved this compiler problem by replacing with:
using Xamarin.Essentials;
[assembly: Xamarin.Forms.Dependency(typeof(DisplayInfo))]
However when I compile and run the code, it falls over when I try consume this in the Xamarin Core Code:
int dpi = DependencyService.Get<IDisplayInfo>().GetDisplayDpi();
I get this runtime error on the above line:
System.NullReferenceException: Object reference not set to an instance
of an object
Any ideas? I would have added this question as a comment on the original, but as a new user do not have the points to do this... If someone could drop a comment on the original question's solution pointing it to this URL that would be helpful too.
So the answer to my own question:
The solution original offered said do this:
In your android implementation, add a new class:
[assembly: Dependency(typeof(DisplayInfo))]
namespace YourAppNamespace.Droid
{
public class DisplayInfo : IDisplayInfo
{
public int GetDisplayWidth()
{
(int)Android.App.Application.Context.Resources.DisplayMetrics.WidthPixels;
}
public int GetDisplayHeight()
{
(int)Android.App.Application.Context.Resources.DisplayMetrics.HeightPixels;
}
public int GetDisplayDpi()
{
(int)Android.App.Application.Context.Resources.DisplayMetrics.DensityDpi;
}
}
}
The problem I did not see anywhere in the Android code that initialised this class, and I was unsure how best to do this really.
So I followed guidance for implementing the interface directly in the Android MainActivity.cs file, and this worked.. The video I watched to help me on that is here:
https://www.youtube.com/watch?v=lgcnYDb6cRQ&t=19s

ASImageNode - Cannot assign to property: 'image' is a get-only property

I'm converting my iOS Project from Swift 2.2 to Swift 3. Everything was going well, but when I tried to set image to an instance of ASImageNode, I got an error that said: "Cannot assign to property: 'image' is a get-only property".
Here is my code:
let imageNode = ASImageNode()
imageNode.image = myImage
However, it worked in Xcode 7 + Swift 2.2.
I checked the definition of the image by 'cmd+click', but Xcode brought me to the -(CIImage *)image; in CIImageAccumulator.h instead of image in ASImageNode.
I could access other class and property in AsyncDisplayKit properly but ASImageNode.image. If I commented all lines with accessing ASImageNode.image, my project was built successfully.
the solution that worked for me is updating this library .. just update all dependencies that use UIImage , it looks like there's no other solution.
"var imageee:UIImage?"
Initialize by this Hope Worked for you
solved my problem by this way

Compile Failing for iOS 4 with Sqlite

I wrote an iPhone app against SDK 2.2, I have updated my XCode and SDK so now I only have SDK 4.2 and I want to update my app to run with that.
The problem is I can't even get it to compile!
I get the following error:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/include/sqlite3.h:5772: error: expected '=', ',', ';', 'asm' or 'attribute' before 'int'
The line in question is:
SQLITE_API int sqlite3_rtree_geometry_callback(
sqlite3 *db,
const char *zGeom,
int (*xGeom)(sqlite3_rtree_geometry *, int nCoord, double *aCoord, int *pRes),
void *pContext
);
I have tried relinking the newer sqlite frameworks, both libsqlite3.dylib and libsqlite3.dylib, but both still cause this error.
If I comment out my import statement (#import "sqlite3.h"), it compiles just fine. (Although it crashes when I run it, obviously.)
I've used the same way Sqlite.h use to import this library:
#import <sqlite3.h>
and it solved the issue.
I ended up creating a new project, and importing all the files from the original, and then linking the sqlite framework. After that it compiled just fine.
I managed to make it work after replacing #import "sqlite3.h" by #import "/usr/include/sqlite3.h"