Need to use own imaged markers instead built-in pins. I have several questions.
1. Is it legally? I have a doubt because there is no standard support for markers(pins) with own icon.
How to make a marker with own icon right way?
I found the post which actually describe how-to: http://www.arlingtondev.com/thoughts/?p=81. I am a newbie, but it looks like a "crutch", which i do not want to use in my clean code. Could you advise better way? I had a lot of problems while integrate that method and currenlty cannot move and animate icons, that's why decided to ask stackoverflowers.
Yes, you can. Check the MKAnnotationView class, it's specifically designed for that. In fact, MKPinAnnotationView inherits from it. Use the image field to specify an image.
Related
I'm wondering what the best way is to do a split NSToolbarItem like Xcode does. I've read the documentation, but can't figure out a way to do this. Any ideas?
It's a custom control. Basically it's a custom NSView, drawing a background the same as a button/popup, draws the "selection" on both sides, handles mouse events and displays one of two menus based on which side was clicked. It's not difficult, but it's not a trivial amount of code to whip up and share either. Just look at any examples of making any kind of clickable custom view and you'll be on your way.
https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaViewsGuide/SubclassingNSView/SubclassingNSView.html
I have been making an iPhone App where I need to identify and decompose different shapes(e.g Wall, Chair, Book, etc..) in UIImageView's image and change their color. So far I have implemented code to allow user to select color and apply it to selected area (pixel base) using gesture recogniser but what I am looking for is far more than what I have done!
Is it posible to detect the different shapes available in given image and change their color?
Thanks.
whatever algorithm you use, you should place it on top of one of the best frameworks for computer Vision, open CV for iOS
then you might check other projects in other languages that do this image segmentation using open cv, and with the theory may be roll your own solution ;)
good luck
Object recognition and detection is a very wide topic in computer science and, as far as I know, is not supported by UIImage's public methods. I think you have a long way to go in order to achieve your goal. Try and look up any open source iOS projects that handle object detection or maybe even look into non-native libraries that have iOS wrappers, such as openCV. Good luck, don't give up.
I'm working on an app with a MapKit map, which I want to display as Black&White, rather than the default color scheme.
How do I do that?
Is there a method I can set the color scheme with?
Are there specific constants I can set for the color scheme?
Is there a combination of masking the MapKit view with some image that applies an effect of Black&White?
Thanks,
Nur
You can use route-me instead of UIMapView and select the desired mapsource that suits you.
There's no way to change the colour of the map in MKMapView. The only thing you can change really is the mapType property which defines if it's a standard map, satellite or hybrid.
I doubt you'd be able to easily do anything with an overlay to make it B&W either. It might even be a violation of the terms of using the Google maps to do that anyway - I'm not sure on that, but it's possible it is.
So if you really need it B&W then I suggest using something other than the standard MKMapView.
To expand on some of the answers:
You cannot set MapKit to black and white. It violates the terms of use.
Your best bet is you use route-me with an offline tileSource. Google TileMill. They allow you to create your own maps from shape files which you can download off different sites. You then use route-me to display the maps you created.
I want to implement an UI which should look like Speedometer. Is there a way to implement like that? Some of apps i seen that they have implemented. For ex. an app called "TaxCaster" implemented it. Could someone help me how can i achieve it?
Thank you in Advance.
That is possible yes, but it will not be easy. You will have to either use OpenGL or Core Animation. I would suggest the latter if you want something like they have in TaxCaster.
You can find more about Core Animation here.
I hope it helps.
A possibility is to simply have two UIImageViews:
A background that has all the measurement listings (i.e. the ruler part), and another that would act as your needle, pointing to the current measurement. All you would need to do when changing the current measurement would be to use the transform property to rotate it into the correct position.
Not a trivial amount of work, but it shouldn't be too hard.
Ok, narrow question of the day. I'm using GflAx (from xnview) to create some graphic tiles. I would like to put some gradients in as well though.
Is there a way I can do this within this product?
There is also an SDK which is part of this product but I can't find that info there.
You can not do this but you can create the gradient in another program and then do a "LoadBitmap" make the mods you need ontop of that 'background' and then save to a new file.