I have been battling various items in iOS over that past week and it is getting really frustrating.
First up I really wanted a dialog with some text entry and a few buttons. They pulled the "custom view" part out post iOS 6 so I found a few GitHub repositories that should solve the problem. First once just did not pan out and the UIView just did not look right. Second one appeared to work OK at first but then it did not play well in iOS 8 in landscape.
Apple decided to change the way you get back height and width of the screen in iOS 8. Previously you always got height and width as if you were in portrait mode. Now they give it back for the current screen orientation. Huge change for programmers. People had height / width swapping code to handle this and you still have to do that for iOS 7 and older.
I fixed the code so landscape worked for iOS 8 on the simulator. Once I ran it on a real device things went to crap again. Extra things being painted and the keyboard popping up really screwed things. Lesson learned - iOS really does not like this sort of popup with editing.
Gut things yet again and go with a UIPopoverController on the iPad and navigation to a UIViewController on the iPhone. Can't say I am super happy with the iPhone version but it works and popping up the keyboard does not screw anything up.
Next up was the menu. iOS 7 has a bug. If you have too many items in a UIActionSheet on an iPhone you can't tap the top most item if it happens to cover the main navigation area. Works fine on iOS 8 but broken on iOS 7. UIActionSheet expects just a few items.
So I found a popup menu that allows up to 9 items per screen and you can swipe to scroll and see more. It is call btSimplePopUP. Now I should have known that someone using two menus - btSimplePopUp and btSimplePopUP - in the same directory structure was going to be iffy. The demo screens look nice though. I put in the code and I get the menu to appear but with a black background. What? It is not blurring out my UIViews, just blanking them out. Then I look for known issues and it turns out the control does not work in landscape which is a requirement for me.
Punt that control. I am now looking at KxMenu which seems to be working in portrait and landscape and takes up a lot less screen space than UIActionSheet. Hopefully it will be the solution.
Lots of GitHub projects lose support. iOS 8 was a big change and it takes some recoding especially with custom controls due to the changes Apple made. Stinks people don't have the time to keep things updated. Even worse when I waste the time trying to get them to work. I need to start looking at the known issues first. Anytime it does not support landscape I am not going to use it. Hopefully they also list if there is iOS 8 support issues as well.
Showing posts with label tools. Show all posts
Showing posts with label tools. Show all posts
Tuesday, March 3, 2015
Thursday, March 7, 2013
What I installed on my Mac at new job
Boy it has been a long and winding road to get the new MacBook Pro into a useful state. I realize Macs are meant to be super easy to use but that gets in the way of power users.
I have learned a lot of new terminal commands, where files reside on a Mac, naming conventions when reading Mac web pages and what not. I will try to share what I can before I forget it all and move on to the next thing.
I wanted to see hidden files. Executing this in terminal allows for that:
defaults write com.apple.finder AppleShowAllFiles TRUE
Change the TRUE to a FALSE to reverse the change.
~/ means your home directory when you are on a web site.
See the first five lines of the clipboard
pbpaste | head -n 5
Terminal is OK but I wanted a tabbed support as I use Console 2 on the PC. I installed iTerm to handle that situation. I also like a semi-transparent background on the terminal as I am generally monitoring things behind it too.
Finder is really not my cup of tea but I was able to get around most of my issues using xtraFinder. While this program is still in beta it fixes the major issues I have with Finder and it is free.
1) Tabs to open multiple directories instead of having multiple windows open on screen
2) Grouping folders first then files. Never understood why Finder does not have this option. Most of the time I am looking for a folder first then a file within second, I don't want to scroll way the heck down to find my Folder. I know I can sort by Kind to get them in group but that still puts them randomly somewhere grouped in a list.
I copied in my music files from a USB key from my Windows box. There was a stupid desktop.ini file left in each album directory. I wanted to delete all of them which on Windows is:
del desktop.ini /s
For the Mac I needed:
find . -name 'desktop.ini' -print -exec rm -fr {} \;
If you don't then you will get errors when attempting to install programs.
I have learned a lot of new terminal commands, where files reside on a Mac, naming conventions when reading Mac web pages and what not. I will try to share what I can before I forget it all and move on to the next thing.
I wanted to see hidden files. Executing this in terminal allows for that:
defaults write com.apple.finder AppleShowAllFiles TRUE
Change the TRUE to a FALSE to reverse the change.
~/ means your home directory when you are on a web site.
See the first five lines of the clipboard
pbpaste | head -n 5
Finder is really not my cup of tea but I was able to get around most of my issues using xtraFinder. While this program is still in beta it fixes the major issues I have with Finder and it is free.
1) Tabs to open multiple directories instead of having multiple windows open on screen
2) Grouping folders first then files. Never understood why Finder does not have this option. Most of the time I am looking for a folder first then a file within second, I don't want to scroll way the heck down to find my Folder. I know I can sort by Kind to get them in group but that still puts them randomly somewhere grouped in a list.
I copied in my music files from a USB key from my Windows box. There was a stupid desktop.ini file left in each album directory. I wanted to delete all of them which on Windows is:
del desktop.ini /s
For the Mac I needed:
find . -name 'desktop.ini' -print -exec rm -fr {} \;
I realize this is a more powerful command but this is a simple thing I need to do a lot and what I had to type to make it happen was not straight forward. I will have that command in my pocket from now on though.
I had to tweak my security settings to allow me to install things not from the Mac Store. Good to stop a normal user from doing this and it was a one time change to make me happy.
Mac Ports seems to be the way to go to install 3rd party products. You need to know the name of what you are installing. You get to type your password a lot as you are using SUDO commands left and right to accomplish this. It works and the web sites are really good at listing the port name you need to use for the install.
Just found you need to do this after installing Xcode and the Xcode command line tools:
sudo xcodebuild -license
Just found you need to do this after installing Xcode and the Xcode command line tools:
sudo xcodebuild -license
If you don't then you will get errors when attempting to install programs.
The company uses VMware Fusion so I had a license. I was able to quickly install Win 7 professional from DVD. Some of the production apps are written in C# thus the need for a VM to run them.
iTunes does not support common audio file formats so I used Adapter to convert music to MP3 so I can listen to it on my Sennheiser wireless headphones. I have had them for a couple of years now and still on first set of rechargeable batteries. While not perfect, an occasional hiccup due to interference, they have served me well.
At the prodding of the other developer who started on the same day as I did I installed Evernote. Nice app to type in random thoughts and to do lists as they hit my brain. I can see all that stuff on my Note II which makes it very easy to remember the crazy list of items I still need to bring in.
I use Sublime 2 as my text editor. I like it that I have the same editor on my PC at home as on the Mac. Some of the keystrokes are a bit different but I am getting used to that too.
All the other set up was configuring SQL settings, other environment variables, VPN, tweaks to various programs so they operate to my liking and doing web research on my first project and on tools they use here that I am not deeply familiar with yet.
I also need to find out coding style. Seems to be opposite of the last job no matter where I go. I am used to braces on same line but it appears that they are on separate line here. No big deal to me, configure Eclipse to do it that way and get on with life.
Do wish I had a docking station for the MacBook, unplugging everything to take it home for the night is a bit silly. Was so easy to undock the Lenovo laptop at old job and put it in bag with extra power supply. Not enough USB ports and they seem to trickle charge my phone. I have the external keyboard in one port and my phone in the other leaving zero for anything else.
Subscribe to:
Posts (Atom)